Tim Abbott
e76eac49cb
Reload the browser on CSRF token errors.
...
We've seen in our error logs browser clients that were constantly
retrying requests to our server after the user logged out in one tab
but didn't close another.
(imported from commit 68dd8d9e618083bc116ae3a96dbcc78fa9301bba)
2013-12-19 16:52:52 -05:00
Tim Abbott
795930c803
Add channel module wrapping our various JSON requests to the server.
...
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Tim Abbott
8c6ac1288d
Add a couple more IP addresses to ALLOWED_HOSTS.
...
(imported from commit 472bfbb59169cea7a0730073319f262936c07185)
2013-12-19 16:52:35 -05:00
Tim Abbott
2ca5f43f05
Report json format 500 errors from all json format views.
...
Previously, we only did this via rest_dispatch.
(imported from commit b0edfdccea294378292b64677a64d5b01f936b08)
2013-12-19 16:48:51 -05:00
Tim Abbott
b30afe432e
Return a nice JSON error when CSRF errors happen in JSON views.
...
(imported from commit 916166c115f9b3ba0fdc93f8d917ff37ae22c2ae)
2013-12-19 16:48:51 -05:00
Tim Abbott
014b5e8a91
Add a per-request realm filters cache.
...
This avoids doing hundreds of memcached queries in get_old_messages.
(imported from commit 8b64cac3e4e91d46762a13d6812bd3c6f517e9ef)
2013-12-19 14:04:55 -05:00
Tim Abbott
c91415f318
Improve names for per-request display recipient cache.
...
It incorrectly advertises itself as per-process.
(imported from commit faf7ca7374d020058e80249bb16a4c6afbcb3e44)
2013-12-19 14:04:55 -05:00
Steve Howell
ea1fefa5b5
Show message history in reverse chronological order.
...
(imported from commit 6237369793044cec7ae8ffec42aaac5d443e2ce1)
2013-12-19 14:03:55 -05:00
Waseem Daher
fc7b8b1254
Offer a "reload" hyperlink when we have no CSS.
...
(imported from commit 237a544c135ad2ad29bd9d1a2b21be2335d2fcd5)
2013-12-18 17:49:34 -05:00
Steve Howell
986c46d417
Color code "Messages sent"
...
(imported from commit d648bfbcdd054a57fb6b39d14d0579819c963c40)
2013-12-18 17:30:47 -05:00
Steve Howell
304da1d01b
Set apart "Messages sent" on /activity.
...
(imported from commit 37faff198396dcf66bb8d99c49030ca5065ab36c)
2013-12-18 17:30:47 -05:00
Waseem Daher
23ddf7b88c
Widening scope of 'Clicking on desktop notification narrows you' experiment.
...
Unfortunately this is basically a WebKit-non-desktop-app-only experiment.
(imported from commit 6f5abe1dcd9113533c339951677a9d3d230038dd)
2013-12-18 16:52:41 -05:00
Steve Howell
ef089692ed
Right-justify numbers on /activity.
...
(imported from commit 11f167626fc3f1338143fc1cf68a1bb1663a93b9)
2013-12-18 16:38:50 -05:00
Steve Howell
5d85bfbf6b
Improve "Messages sent" formatting on /activity.
...
(imported from commit 891760c116d5a3290b49fb2d75eae0f0b227540d)
2013-12-18 16:34:03 -05:00
Steve Howell
ef959a748e
Exclude mit.edu from history counts.
...
(imported from commit eb27f4bb0f6eb07c2d72d4f32fa21995f215254e)
2013-12-18 16:34:03 -05:00
Luke Faraone
50e8d8b69a
Specify default for EMAIL_GATEWAY_EXAMPLE
...
Otherwise the app would crash when it tried to build template context:
Traceback (most recent call last):
[...]
File ".../zerver/context_processors.py", line 23, in add_settings
'email_gateway_example': settings.EMAIL_GATEWAY_EXAMPLE,
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'EMAIL_GATEWAY_EXAMPLE'
(imported from commit 6cc5d3f150326a55230ea91e6c228ae9b1e19df3)
2013-12-18 16:25:10 -05:00
Luke Faraone
a5775d94ef
Install uploads.types in puppet
...
We also move uploads.types to zulip-include-frontend since its only
needed on the frontends.
(imported from commit cfdf15c0c537f7ea4c239b0f882aeaa561929777)
2013-12-18 16:25:10 -05:00
Leo Franchi
9c82e869c2
[manual] Release OS X desktop app 0.4.2
...
This reqires a puppet apply as well as a manual move of the installed
files and symlink switch. Leo will do it when it hits master.
(imported from commit e58e52087ad38f1cb8e0e606b82266a93cf91e53)
2013-12-18 16:14:51 -05:00
Steve Howell
7cded2a956
Show realm history on the main activity page.
...
This shows the number of messages sent by humans for the last
eight 24-hour periods, for each realm. "Messages sent" isn't a
perfect metric of activity, but it's easier to query with our
current data model than certain other statistics.
(imported from commit 9de3c479640a0b9dbc017b245dda21d951f4efa4)
2013-12-18 16:01:44 -05:00
Tim Abbott
411b0a8777
Fix EXTERNAL_API_PATH and friends for prod and localhost.
...
We were incorrectly manually setting EXTERNAL_API_PATH for localhost
in local_settings.py, but the exception case we should be setting it
manually for is prod.
(imported from commit cbdf75c87ffccdeb306407a59c6594880f4461eb)
2013-12-18 16:01:19 -05:00
Steve Howell
ab9f6b301f
Validate msg_ids in messages_in_narrow_backend.
...
(imported from commit fde39d8766b2de9e41dee52e3372ce4aa27c353b)
2013-12-18 16:00:16 -05:00
Steve Howell
ea42d0bb16
Validate narrow in events_register_backend.
...
(imported from commit 5b873846fece98f7fbf0b6cb6ed5c098e72ac7f4)
2013-12-18 16:00:16 -05:00
Steve Howell
f7ec8cccc7
Validate subscriptions in add_subscriptions_backend.
...
(imported from commit 3d4b669ade135dfa85c01238db110a5e4c1362b2)
2013-12-18 16:00:16 -05:00
Steve Howell
48319f9763
Validate subscriptions in remove_subscriptions_backend.
...
(imported from commit 9cbbaf35791b204c78a56d7598cff9775901c5ed)
2013-12-18 16:00:16 -05:00
Steve Howell
28b5b175a3
Validate messages in update_message_flags.
...
(imported from commit e4905fb0f56f56e5486828eb177493c42a0792f2)
2013-12-18 16:00:16 -05:00
Jessica McKellar
0d7ea7353f
Don't show broken images in digest and missed PMs emails.
...
(imported from commit 92297b4c8f020e30b5c00e93bf32df6e19069dd8)
2013-12-18 14:31:04 -05:00
Jessica McKellar
96ea91056e
Support displaying emoji in digest and missed PM emails.
...
(imported from commit b440da2501ccb6dd95dc79c3fbce1e81b17c38f4)
2013-12-18 14:31:04 -05:00
Jessica McKellar
2f59f69a1f
digest: tweak sender information.
...
(imported from commit fafc54d4b9c9cda447c42f2bd24845aee62624c2)
2013-12-18 14:31:03 -05:00
Jessica McKellar
5e217a1079
Use correct time zone in digest email cron job.
...
(imported from commit fd470af4b44ffb9696ff3a97372aaf2524a4806b)
2013-12-18 14:31:03 -05:00
Tim Abbott
73643acd03
Fix muting the last stream in the home view.
...
(imported from commit b35e9903cdb8697a1010147854feb13060e9516d)
2013-12-18 14:30:17 -05:00
Tim Abbott
0a1febacb3
Fix traceback loading the app with all streams muted.
...
(imported from commit 42190bdbba3d56e79d1d9e19b85d6bba0d0d747f)
2013-12-18 14:30:17 -05:00
Waseem Daher
45dd03bfc7
apps: Properly name Linux repo key.
...
Tiny remove-newline fix as well.
(imported from commit 5c68635973366b9ff68a96fdca3bf3196583d690)
2013-12-18 14:22:11 -05:00
Steve Howell
532fa9fae8
Remove dead code in /activity reports.
...
(imported from commit ea9ddae01fd5527c6a4ceefaaa5fac091618f544)
2013-12-18 13:42:30 -05:00
Steve Howell
0c1f57815c
Add grahite to link to /realm_activity.
...
(imported from commit 6d2a23ffcca23a65e5aadb2ed8499645e42131e0)
2013-12-18 13:40:07 -05:00
Steve Howell
be1857ceb3
Add blank line to check_list (cosmetic).
...
(imported from commit 20a9eed98846e976c7fa2cfdb43e25e1c43c850d)
2013-12-18 12:47:32 -05:00
Steve Howell
9df608c612
Validate muted_topics variable in json_set_muted_topics.
...
(imported from commit 1f6250bb170212af9b5f79a4ef07d57cdaab641d)
2013-12-18 12:45:30 -05:00
Steve Howell
6f573feaeb
Add "length" option to check_list validator.
...
(imported from commit 4f8e203f964d1c936fe548b2f77a2e4aae745ae9)
2013-12-18 12:45:29 -05:00
Steve Howell
b2bffc26f9
Validate alert_words is a list of strings.
...
(imported from commit f6776c17ce4fcc84b9a6a75858154837c6122789)
2013-12-18 12:45:28 -05:00
Steve Howell
e7a42ffd02
Add test for /json/set_alert_words.
...
(imported from commit 307d87331870a89713030e8178b1aa14a31cfdfd)
2013-12-18 12:45:28 -05:00
Luke Faraone
0311bf8e4b
Don't crash if prereg_user doesn't have default streams set
...
(imported from commit 8d24ecd1bac801f3b8502116933ed4470f4fad9e)
2013-12-18 11:33:34 -05:00
Steve Howell
b764bb427b
Validate invitee_emails better in json_bulk_invite_users().
...
(imported from commit a446a361677bcb0501d9a340f7b5bb3614c7481b)
2013-12-17 16:24:59 -05:00
Steve Howell
94e3c02649
Add test_bulk_invite_users().
...
(imported from commit bc8ab756dae0fd82e73b5b2a9655974c5fc839b0)
2013-12-17 16:24:59 -05:00
Tim Abbott
d62ca820db
puppet: Fix permissions on /etc/cron.d/log2zulip.
...
(imported from commit 33ee5ae97b09b3925849940262ecd0bcbce38a3f)
2013-12-17 16:22:14 -05:00
Tim Abbott
ae6c17a87d
puppet: Stop using /var/log/nginx/zulip.*.log.
...
It's confusing to have our log data on different files on different
systems (e.g. loadbalancer vs. app).
(imported from commit be701072ee05e2659f146b226a39f33cb4707180)
2013-12-17 16:22:08 -05:00
Tim Abbott
3b7bf691e7
Add tool to query our usage stats as of a given date.
...
This contains the various fixes that needed to be made in order to get
accurate statistics.
Most notably, the active_users_between function in the previous
version of zerver/lib/statistics.py was broken for end dates in the
past, because it used the UserActivity table to get its data -- so in
fact it really was querying "users last active between".
This commit isn't super clean, but I figure we're probably better off
having our latest code for historical usage data in git so it doesn't
bitrot and anyone can improve on it.
(imported from commit 24ff2f24a22e5bdc004ea8043d8da12deb97ff2f)
2013-12-17 15:34:44 -05:00
Tim Abbott
6ccf19bed6
Run log2zulip on load balancers too.
...
(imported from commit 74c8be20d2d03aa524f05b7681febe9a9be9cdff)
2013-12-17 13:46:00 -05:00
Steve Howell
ea49e9d1b0
Rename check-handlebar-templates to check-templates.
...
(It's been checking Django templates too.)
(imported from commit e1a92210d07dfd68666a8c93642c4eb8d5ff081f)
2013-12-17 12:44:59 -05:00
acrefoot
c30f2bbe3e
slightly stricter linting of html templates
...
(imported from commit 5bd0aa3c49d6ff95559a73bd5f134cc50ae98ce9)
2013-12-17 12:05:23 -05:00
Steve Howell
f174038100
Throttle user list updates to 5s intervals.
...
(imported from commit 908806d1ac00f14802f2a01a40d0abb66778a441)
2013-12-17 11:54:53 -05:00
Tim Abbott
8dcf7d4cc3
[puppet] Add log2zulip tool for sending log files to Zulip.
...
This tool is a little crude; it runs out of a cron job and will
forward to staging a notice about any new lines in the declared log
files, truncating if there are more than 10 lines.
(imported from commit 6748ddff1def0907b061dc278a3a848bd2e933f1)
2013-12-17 11:02:55 -05:00