Commit Graph

31306 Commits

Author SHA1 Message Date
Vishnu Ks ab63f2b524 requirements: Upgrade indirect dependencies in dev.txt, prod.txt. 2019-04-26 16:22:00 -07:00
Vishnu Ks 16394e53a3 tools: Make dependency upgrader upgrade indirect dependencies separately. 2019-04-26 16:22:00 -07:00
Rishi Gupta 14428f7996 docs: Clarify you need to upgrade from git for Zulip Cloud exports. 2019-04-26 15:59:24 -07:00
Hemanth V. Alluri 34db469700 org_settings: Fix error with undefined profile_field in bot settings.
This is a small patch to fix the error message an admin would receive if
they tried to change bot info and owner from the "bots" setting of the
organization settings panel.
2019-04-25 15:56:44 -07:00
Hemanth V. Alluri c192327a37 settings_account: Fix small typo in initialize_custom_user_type_fields. 2019-04-25 15:56:44 -07:00
Tim Abbott c1d8b17e49 docs: Stop mentioning legacy Android app in gsoc ideas. 2019-04-25 15:40:09 -07:00
Rishi Gupta 6e2adc6a7b docs: Update gsod-ideas.md. 2019-04-25 15:38:52 -07:00
Puneeth Chaganti dabe267d00 html_to_text: Add arg to specify html tags for generating text.
Closes #11497
2019-04-25 15:29:16 -07:00
Puneeth Chaganti 2d9c5b3575 open graph: Display realm description as open graph description. 2019-04-25 15:29:16 -07:00
Puneeth Chaganti a653fcca93 html_to_text: Escape text when using as description. 2019-04-25 15:29:16 -07:00
Puneeth Chaganti 009beabe53 test_middleware: Use test helper in nonexistent page open graph test. 2019-04-25 15:29:16 -07:00
Puneeth Chaganti 41ff94bdba test_middleware: Parse html in tests instead of using regex.
This slows down the tests by about 5-10% -- the tests go from 0.6s to 0.630s or
so. But, this seems like a change worth making to prevent open-graph metadata
breaking HTML.
2019-04-25 15:29:16 -07:00
Puneeth Chaganti 7d7134d45d html_to_text: Extract code for html to plain text conversion. 2019-04-25 15:29:16 -07:00
Tim Abbott cc421d4415 tests: Fix bad use of mock local variable name.
This ended up masking the mock module.
2019-04-25 15:28:10 -07:00
sameerchoubey 048ec39824 tools/test-api: Test Client.update_stream. 2019-04-25 16:24:59 -02:30
sameerchoubey 6790c22d8d tools/test-api: Test Client.update_presence. 2019-04-25 16:24:59 -02:30
sameerchoubey 598727f696 tools/test-api: Test Client.update_notification_settings. 2019-04-25 16:24:59 -02:30
sameerchoubey cedce30d99 tools/test-api: Test Client.update_user_group_members. 2019-04-25 16:24:59 -02:30
sameerchoubey 3140aabbd7 tools/test-api: Test Client.remove_user_group. 2019-04-25 16:24:59 -02:30
sameerchoubey 49e843cd75 tools/test-api: Test Client.update_user_group. 2019-04-25 16:24:59 -02:30
sameerchoubey 2c675efbba tools/test-api: Test Client.create_user_group. 2019-04-25 16:24:59 -02:30
sameerchoubey 53b58d0c7f tools/test-api: Test Client.remove_alert_words. 2019-04-25 16:24:59 -02:30
sameerchoubey c5c2c13880 tools/test-api: Test Client.add_alert_words. 2019-04-25 16:24:59 -02:30
sameerchoubey b26b4ce60c tools/test-api: Test Client.get_alert_words. 2019-04-25 16:24:59 -02:30
sameerchoubey 2d9b54f0d5 tools/test-api: Test Client.delete_stream. 2019-04-25 16:24:59 -02:30
sameerchoubey 56ad6758f6 tools/test-api: Test Client.remove_reaction. 2019-04-25 16:24:59 -02:30
Vit Rozkovec a16da1f98c emails: Add alt tags to images. 2019-04-24 17:49:56 -07:00
Tim Abbott bf9f08a3e6 version: Update version and changelog for Zulip 2.0.3 release. 2019-04-23 16:05:12 -07:00
Anders Kaseorg 21dc34cc52 open graph: HTML-escape og:description, twitter:description.
The entire idea of doing this operation with unchecked string
replacement in a middleware class is in my opinion extremely
ill-conceived, but this fixes the most pressing problem with it
generating invalid HTML.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:53:59 -07:00
Rishi Gupta 088714fb8f settings: Add sectioning to Other notifications section.
There are no other <h5>'s in static/templates. Basically just copied the
styling of `#settings_page h3` above it.

The vertical spacing here isn't great, but I think will require some deeper
fixes.
2019-04-23 15:24:39 -07:00
Rishi Gupta a501abf3a1 settings: Move pm_content_in_desktop_notifications into Other notifications.
Not as nice as the previous coupling, but needed for upcoming refactors to
this page.
2019-04-23 15:24:39 -07:00
Rishi Gupta 29d30ceab7 settings: Decouple enable_push_notifications_offline from PM setting.
Note that this setting has always applied to both streams and PMs; the test
just clarifies that that is the case.
2019-04-23 15:24:39 -07:00
Rishi Gupta 8a2772adcf settings: Update tip in Notifications tab. 2019-04-23 15:24:39 -07:00
Rishi Gupta 3e899db35b settings: Update ordering of Notification settings for consistency.
The order in the streams section is visual, audio, mobile, email, which also
seems to match other products (though didn't do a careful analysis). This
changes the PM section to match.
2019-04-23 15:24:39 -07:00
Rishi Gupta 154379c6ae settings: Update wording for PM settings on notifications tab. 2019-04-23 15:24:39 -07:00
Anders Kaseorg 122ad5be58 lint: Lint against calls to _() on computed strings.
These don't actually work from an i18n perspective.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:23:18 -07:00
Anders Kaseorg 9a9de156c3 lint: Fix calls to _() on computed strings.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:23:03 -07:00
Anders Kaseorg 44dd7c2d95 lint: Strengthen lint checks for string % non-tuple.
This is really a job for an AST parser rather than a pile of regexes;
among other issues, these will still miss violations that span
multiple lines.  But, you know, I tried.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:22:51 -07:00
Anders Kaseorg 643bd18b9f lint: Fix code that evaded our lint checks for string % non-tuple.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:21:37 -07:00
Tim Abbott d1b8497afb settings: Fix comment explaining NOREPLY_EMAIL_ADDRESS.
This documentation comment incorrectly claimed that we don't use
NOREPLY_EMAIL_ADDRESS when ADD_TOKENS_TO_NOREPLY_ADDRESS=True.

Fixes #12169.
2019-04-23 14:46:39 -07:00
Anders Kaseorg 9937734e50 terminate-psql-sessions: Only terminate if we have permissions.
We have been semi-accidentally relying on the fact that terminate-psql-sessions 
fails silently when there are PIDs we don't have permission to terminate.

This actually happens somewhat often, generally when we're doing a series of
operations in quick succession by different users, because postgres processes
live a little longer than the `psql` shell that started them.

As part of adding ON_STOP_ERROR to all of our postgres commands, it makes
sense to enforce we don't fail here, but that means we need to actually filter
the target PIDs to only ones we can actually kill.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 14:41:42 -07:00
Eeshan Garg c012362fde webhooks/librato: Use proper punctuation. 2019-04-23 14:32:21 -07:00
Eeshan Garg d733cc500c webhooks/groove: Rewrite the integration and improve messages.
The initial goal was to improve message formatting and punctuation
but after a closer look, I realized that a larger refactor was
worth it for clarity and redability.
2019-04-23 14:32:21 -07:00
Tim Abbott cb6c1e7a92 export: Fix log line about zerver_scheduledemail_users. 2019-04-23 13:52:02 -07:00
Tim Abbott cfd5054f2d zilencer: Add indexes for remotecount models.
These new indexes improve the performance of checking whether our
Remote*Count models are up to date by a factor of ~1000.
2019-04-23 13:52:02 -07:00
Anders Kaseorg 098e5ad3de templates: Fix more low-hanging HTML validation problems.
"http://localhost:9981/help/enable-emoticon-translations":323.13-324.31: error: The “align” attribute on the “th” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":324.45-325.31: error: The “align” attribute on the “th” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":329.13-330.23: error: The “align” attribute on the “td” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":330.44-331.23: error: The “align” attribute on the “td” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":337.6-337.9: error: Stray end tag “p”.
"http://localhost:9981/help/enable-emoticon-translations":337.6-337.9: error: Cannot recover after last error. Any further errors will be ignored.
"http://localhost:9981/api/incoming-webhooks-walkthrough":381.4-381.77: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/apps/":192.21-192.34: error: Bad value “” for attribute “src” on element “img”: Must be non-empty.
"http://localhost:9981/apps/":192.21-192.34: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/features/":225.9-225.82: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/features/":230.72-232.8: error: Text not allowed in element “svg” in this context.
"http://localhost:9981/features/":259.9-259.91: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 13:00:59 -07:00
Anders Kaseorg f772b5d7d4 docs: Fix easy HTML validation errors and warnings.
"file:/srv/zulip/docs/_build/html/git/troubleshooting.html":266.5-266.12: error: Element "commit" not allowed as child of element "em" in this context. (Suppressing further errors from this subtree.)
"file:/srv/zulip/docs/_build/html/git/troubleshooting.html":266.13-266.17: error: End tag "em" violates nesting rules.
"file:/srv/zulip/docs/_build/html/overview/architecture-overview.html":211.69-211.136: error: Start tag "a" seen but an element of the same type was already open.
"file:/srv/zulip/docs/_build/html/overview/architecture-overview.html":211.171-211.174: error: Stray end tag "a".
"file:/srv/zulip/docs/_build/html/translating/hindi.html":252.36-252.48: info warning: Text run is not in Unicode Normalization Form C.
"file:/srv/zulip/docs/_build/html/tutorials/writing-views.html":469.34-469.41: error: Element "method" not allowed as child of element "p" in this context. (Suppressing further errors from this subtree.)
"file:/srv/zulip/docs/_build/html/tutorials/writing-views.html":471.122-471.125: error: End tag "p" seen, but there were open elements.
"file:/srv/zulip/docs/_build/html/tutorials/writing-views.html":469.34-469.41: error: Unclosed element "method".

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 12:56:05 -07:00
Rafid Aslam d983611919 template_parser: Add support for jinja2 whitespace markers.
Fixes #11516.
2019-04-23 11:52:13 -07:00
Tim Abbott d4893dfcbc docs: Make API endpoint docs link to materials on REQ.
This should help avoid bugs like the one in the previous commit.
2019-04-23 11:31:19 -07:00
Tim Abbott fa37401e69 api docs: Fix typo in typing notifications docs.
notification_to should be just to here.

This resulted from the person doing the port into these docs not
understanding the full REQ API.
2019-04-23 11:24:07 -07:00