Commit Graph

167 Commits

Author SHA1 Message Date
Keegan McAllister 8aa4e8c5f1 URLencode email in URL instead of HTML escaping it
HTML escaping makes absolutely no sense here.  The other occurrence was already
removed in 55fff703924ef28060f0b91af3a6f06a1a636197 .

(imported from commit 3b7569dee381f6db290fc1527553802883e89ed7)
2012-10-10 17:24:49 -04:00
Luke Faraone c2117a58e1 Don't use strip_html on passwords.
(imported from commit 2ecea072f545b5902b33bdc8e621871919cbbed6)
2012-10-10 15:16:23 -04:00
Keegan McAllister 26906777c1 Use 'reverse' when redirecting from home, for consistency
(imported from commit badd2a78cbe9d0007c7c8f515613761e68f01096)
2012-10-09 17:15:35 -04:00
Tim Abbott 6a7ce4cfe8 Comment out instance validation until we figure out what we want.
(imported from commit a1c22f9744f28635c67602a682bdb00cba0037ae)
2012-10-04 18:11:12 -04:00
Tim Abbott 12ea2895ea Add a json_success style result to updates responses.
(imported from commit 6492f98f1e1f5b7622caa2f3427ae60bdfd3df0e)
2012-10-04 16:38:44 -04:00
Tim Abbott 27fdb10cbd Return clean invalid user errors using the API.
(imported from commit 2f1687cbe8797ce42e66b340e87400720acd4054)
2012-10-04 16:38:44 -04:00
Tim Abbott 615e520c00 Add '.' to the list of valid class name characters.
(imported from commit 1d6c000434776b0b63f47bb514345746ed18bab9)
2012-10-04 15:17:12 -04:00
Tim Abbott 251177e8cf Add a server-side check that class/instance names are valid.
(imported from commit 4534239e57b08b4d01d2caa68134e205ce6c225a)
2012-10-04 14:48:01 -04:00
Tim Abbott 2a79ff0cc8 Rename 'zephyrs' => 'messages' when formatting a message list to send to clients.
(imported from commit bfbb556f2444aca8277f54c363eccb678b6bf2dc)
2012-10-04 14:42:38 -04:00
Tim Abbott 8c11aeb7ee Rename zephyr_backend => send_message_backend.
(imported from commit 78eb5884777a6631dd6a6a82c21295ee8ee49c11)
2012-10-04 14:38:07 -04:00
Tim Abbott 7991e6e281 Replace 'zephyr' => 'message' in code internal to views.py.
(imported from commit 92d7bc82bd8f6edae1e59cab3e0bd8b7d035775e)
2012-10-04 14:38:07 -04:00
Luke Faraone d8b678c75d Emails with plus signs no longer are rendered with spaces in /accounts/login
(imported from commit 55fff703924ef28060f0b91af3a6f06a1a636197)
2012-10-04 14:27:49 -04:00
Tim Abbott 1ab81cff92 [schema] Rename Zephyr => Message in the schema.
(imported from commit 4f402f150c45d2097d6b16943935e6e370b4f8d8)
2012-10-03 18:14:15 -04:00
Tim Abbott ed8042da73 Fix bug where starnine@mit.edu always gets added to zephyr-forwarded huddles.
(imported from commit 3ab930ed8ad6ce917b33483bd5af3cf27452f6da)
2012-10-03 17:55:14 -04:00
Tim Abbott 83ceba0a2d Remove old /api/get_updates view.
(imported from commit 5a33a61bfb4b3aa40e28c356f5b4048db775b901)
2012-10-03 16:58:31 -04:00
Tim Abbott 9223f7932c Convert zephyr_mirror humbug sending to use the API.
(imported from commit 948a12a1dca903c47b7427248688f2079c7eecdb)
2012-10-03 16:50:29 -04:00
Tim Abbott 40ae6080ee Wide the deduplication windows for catching huddles to 10 seconds.
(imported from commit 0d05ef03a08d285bc4d9967553c25448104586a7)
2012-10-03 13:51:38 -04:00
Tim Abbott 01bc4aaf28 Remove 'zephyr' from invalid message type error.
(imported from commit 360ffc5bfbb12f65af83093ee5a83ac7caa5c464)
2012-10-03 12:30:39 -04:00
Tim Abbott 7acfb5c71c Rename /zephyr/ to /send_message/.
(imported from commit 41c2ff67cfc514e53aff8648c36f545526e324ed)
2012-10-03 12:30:37 -04:00
Tim Abbott 828e0d4afb Rename forge_zephyr to forge_message.
(imported from commit aa2dc6e24a9c1bd6be09bfa26241663ae143cef9)
2012-10-03 12:27:34 -04:00
Tim Abbott cca5f7b76a Rename do_send_zephyr to do_send_message.
(imported from commit df4dc741bf00a197ca5ab39373bc9a3eda379684)
2012-10-03 12:27:34 -04:00
Tim Abbott d2884ba456 Make connection errors disappear more efficiently.
Previously, connection errors would stick around after a problem with
the server until (1) the server was fixed and (2) we later received a
message.  This code change eliminates condition (2) by having the
server return immediately with no messages in the event that the
client has accumulated a large number of errors.

(imported from commit 6a9b08e534db6daea0041a71556ef5b708e935ed)
2012-10-02 17:46:06 -04:00
Tim Abbott e79805847b Rename the 'new_zephyr' argument to the more descriptive 'content'.
(imported from commit b47e2c4823bbfbf2f94cbafb24ed5d78dfbe841b)
2012-10-02 17:29:55 -04:00
Jessica McKellar f54d1d16cc views: remove unused variables and imports.
(imported from commit 9f421867caac561556e47ce79528432fe1b3b2dc)
2012-10-02 17:17:27 -04:00
Tim Abbott 5a5b5de650 Rename /api/v1/get_updates to /api/v1/get_messages.
(imported from commit f856637158cf9fda64ba333b532a5941de8fcbab)
2012-10-02 16:29:34 -04:00
Tim Abbott 18a3888373 [schema] Add an API for sending/receiving messages.
(imported from commit 209d525dc5892fc4c392a8ced1588c838cbb17c4)
2012-10-02 15:49:25 -04:00
Jessica McKellar 33ad7817a4 Require that the first character of a class be a number or letter.
(imported from commit a4d1c23f784107198045aee7cec1f53ab5114762)
2012-10-02 15:16:26 -04:00
Jessica McKellar ec36170511 Fix buggy class name validation regex.
A-z != A-Z. The former permits problematic characters like "\".

(imported from commit 2bcda8683e630eaa6cbc3a2b9d0bda7a8448a8fa)
2012-10-02 15:16:26 -04:00
Jessica McKellar 588db5b4c5 Make class names case-insensitive.
(imported from commit e76e50156ca8dab1f7b3124351997e75ef08e521)
2012-10-02 15:16:26 -04:00
Luke Faraone 0c47459733 Also escape &s.
(imported from commit 8a76089492b0e7f7ff2635e7091485db2d7292c4)
2012-10-02 15:11:55 -04:00
Jessica McKellar 8727b1667c Check if a class name is valid when checking for existence.
(imported from commit f4de50b52c851058b736033d447ea7fa6777a3d4)
2012-10-01 15:36:10 -04:00
Luke Faraone aca5cef3eb Redirect to login when attempting to resignup with a used email address.
(imported from commit d58a5dda9a0af409a6ee57cfcd30be45020352d2)
2012-10-01 10:45:58 -04:00
Luke Faraone 50dfbf7a1b Implement confirmation for new user signups.
We add a few templates for django-confirmation. We define a
"PreregistrationForm" which is validated by accounts_home, which then
generates a confirmation object and emails the user. This required creating
a new table for a PreregistrationUser with an email and status (confirmed)
field.

The register function now no longer accepts a "email" field in the form
and deals only with confirmation IDs to determine the email used to sign
up a user.

(imported from commit 4fcde04530aa7ad4de84579668daee7290b424ac)
2012-10-01 10:45:58 -04:00
Keegan McAllister 5556bdd0a1 Put the type conversions back into return_messages_immediately
This had broken the check 'if last == -1'

(imported from commit 2154dbda696d72ea14c841f43511846a87e4ba0d)
2012-10-01 10:14:47 -04:00
Tim Abbott 85da33c4ee Fix return_messages_immediately.
If the relevant keys don't exist, Django returns a
MultiValueDictKeyError, which wasn't one of the ones we had exceptions
for.  This was breaking the API.

(imported from commit 1c1394006afcbdbee9465ad8c8c667ed5de5a346)
2012-09-28 21:08:39 -04:00
Keegan McAllister 25eeaabe47 On load, send a range around the pointer, then fill in later, then earlier
This still doesn't handle collapsing entirely correctly for the backfilled
messages.

(imported from commit d1fa3e2249968208e735454c27b8cab20bb78d3f)
2012-09-28 19:40:45 -04:00
Keegan McAllister c65a387c1e Factor out the determination of which messages to send immediately
(imported from commit 31c688986e4d8f923913083f36dea9c79a4c36ce)
2012-09-28 18:37:12 -04:00
Keegan McAllister a8ec5c533f Move the code for new messages immediately available into views.py
(imported from commit 4cfa0ead850b1a37a21ec7945b477e12681c5830)
2012-09-28 18:37:12 -04:00
Keegan McAllister 946c901e05 Factor the formatting of the updates response out of get_updates_backend
(imported from commit eb6a09363d671630afa7dea4ff23518c2a90fb97)
2012-09-28 18:37:12 -04:00
Keegan McAllister e9f70c1efb Track the first received message
We don't use this information, yet.

(imported from commit 24a9466823f3e7a287027969d3841c7638954e76)
2012-09-28 18:37:11 -04:00
Tim Abbott 8b87ba04ef Fix apply_markdown option in new get_updates_api function.
(imported from commit 971010fff6408d691c5942c5a651c58413c2c091)
2012-09-27 17:39:28 -04:00
Tim Abbott ccee128d61 New prototype zephyr mirroring system with bidirectional support.
(imported from commit cfb95ae8d0a241e7c068106e561dc18e16461596)
2012-09-27 17:33:21 -04:00
Tim Abbott f7b8d371cd Make the last_received parameter optional.
(imported from commit 001806356286cac85f79f521a48c09686d6f6bb6)
2012-09-27 16:42:15 -04:00
Keegan McAllister 3429e77178 Don't display the "Loading..." indicator if the user has no messages
(imported from commit a050218ccde3b82c570a9373cbab5e3fb22abcde)
2012-09-27 16:15:10 -04:00
Keegan McAllister 4e846f9059 Change the home page back to the register form, but go to login on log out.
This reverts commit 5c21c3b44ebc69377177ceb50b43dfd560f0b4d1.

(imported from commit ef983386ee11cbe3a75a7f0555f81ac71240c4c0)
2012-09-27 15:54:33 -04:00
Keegan McAllister 20240d869c Rename get_updates_longpoll to get_updates
(imported from commit 15635904584b324bdfa1414caea12c3bc4ce54c8)
2012-09-27 15:46:36 -04:00
Tim Abbott 1a5c18b12c Redirect not logged in users to the login page, not the signup page.
(imported from commit 5c21c3b44ebc69377177ceb50b43dfd560f0b4d1)
2012-09-27 15:01:30 -04:00
Tim Abbott 6394a54db7 Clean up the forge_zephyr workflow.
(imported from commit c559cfde267bc537cf554705a9750dcfe76f88ce)
2012-09-27 15:01:30 -04:00
Tim Abbott 8ffd91a6ee Move new user/class creation into their own functions.
(imported from commit 192533c4e2bc55a26e7ea70a32e7d1f64d2ed8c3)
2012-09-27 15:01:30 -04:00
Luke Faraone 94fbb8b6c1 Remove references to HASH_SALT / MD5_SALT in the settings page.
(imported from commit a474454ce5aa8d11a6a0bcc0f0828b54f5dea81f)
2012-09-26 17:36:25 -04:00