Commit Graph

47031 Commits

Author SHA1 Message Date
Tim Abbott
5823cc79f1 release: Fix pushing new release tags. 2022-08-25 12:51:41 -07:00
Tim Abbott
97efbf8590 version: Update version after 5.6 release. 2022-08-24 16:34:43 -07:00
Tim Abbott
d6533973b6 Release Zulip Server 5.6. 5.6 2022-08-24 13:10:05 -07:00
Anders Kaseorg
b12a5be4a0 CVE-2022-36048: Rewrite only specific local links to relative.
Due to mismatches between the URL parsers in Python and browsers, it
was possible to hoodwink rewrite_local_links_to_relative into
generating links that browsers would interpret as absolute.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-24 13:07:42 -07:00
Anders Kaseorg
09fb71f95a requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 74f7b6e4fd)
2022-08-23 15:25:01 -07:00
Anders Kaseorg
64cbd4e7c7 retention: Inline move_rows query arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b4b8691239)
2022-08-23 15:25:01 -07:00
Anders Kaseorg
969fafcacf analytics: Add Composable type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 73374996a5)
2022-08-23 15:25:01 -07:00
Anders Kaseorg
170d805d9f upload: Replace boto3.Session with boto3.session.Session.
boto3-stubs seems to have dropped the former for some reason.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2508b579a6)
2022-08-23 15:25:01 -07:00
Anders Kaseorg
540060d389 settings: Add two_factor.plugins.phonenumber to INSTALLED_APPS.
I missed this in commit feff1d0411
(#22383) for upgrading to django-two-factor-auth 1.14.0.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2439914a50)
2022-08-22 22:41:49 -07:00
Anders Kaseorg
90c45bd230 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit feff1d0411)
2022-08-22 22:41:49 -07:00
Anders Kaseorg
1ae9922a86 test_tornado: Avoid deprecated AsyncHTTPTestCase.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 6c79b8f2f1)
2022-08-22 22:41:49 -07:00
Anders Kaseorg
4a618ed973 db: Use cursor_factory psycopg2 option.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b4cf9ad777)
2022-08-22 22:41:49 -07:00
Anders Kaseorg
0dbc3917ef mypy: Add types-zxcvbn.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 76f4123f42)
2022-08-22 22:41:49 -07:00
Tim Abbott
6c8f5ca459 release: Fix OUTDIR typo.
This was missed in 58962f0b7b.
2022-08-22 22:40:20 -07:00
Anders Kaseorg
e0442e5683 commit-message-lint: Take release branches into account.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-22 22:24:27 -07:00
Anders Kaseorg
6f08dbe11b decorator: Check Tornado secret with constant-time comparison.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-22 22:23:24 -07:00
Anders Kaseorg
84064e82c7 zilencer: Check remote server API keys with constant-time comparison.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-22 22:22:19 -07:00
Tim Abbott
6f4d38bed7 i18n: Update translation data from Transifex. 2022-08-22 22:20:43 -07:00
Tim Abbott
73ebc6a3b0 docs: Document changing subdomains on multiple organizations page. 2022-08-17 11:37:02 -07:00
Tim Abbott
87e8913703 docs: Remove documentation for ROOT_DOMAIN_LANDING_PAGE.
This is not a feature intended to be used outside zulip.com, since it
just sets your server to have the zulip.com landing pages. I think
it's only been turned on by people who were confused by this text.
2022-08-17 11:37:01 -07:00
Tim Abbott
cb57c5e2e4 docs: Clean up documentation for multiple hostnames.
The previous documentation did not spell out what to enter in the
realm creation form.
2022-08-17 11:37:00 -07:00
Matt Keller
aeea9e3366 version: Update version after 5.5 release. 2022-07-21 21:17:01 -04:00
Matt Keller
e74582838f Release Zulip Server 5.5. 5.5 2022-07-21 20:29:38 -04:00
Matt Keller
69a7690a89 tools: Add executable bit to release tool. 2022-07-21 20:29:38 -04:00
Anders Kaseorg
c9f6830ba6 CVE-2022-31168: Fix authorization check for changing bot roles.
Due to an incorrect authorization check in Zulip Server 5.4 and
earlier, a member of an organization could craft an API call that
grants organization administrator privileges to one of their bots.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-21 20:09:02 -04:00
Alex Vandiver
93d2c77225 restore-backup: Provide flags to leave settings.py and zulip.conf as-is. 2022-07-21 11:45:41 -07:00
Alex Vandiver
5cd22c2c80 restore-backup: Only extract /etc/zulip once.
This is already handled in the earlier block; there is no need to
extract it twice.
2022-07-21 11:45:41 -07:00
Alex Vandiver
808838597a restore-backup: Switch to run() to check exit codes. 2022-07-21 11:45:41 -07:00
Alex Vandiver
639d42c59f restore-backup: Ensure it is run as root. 2022-07-21 11:45:41 -07:00
Alex Vandiver
0aa3b9136f release: Use the right variable to build predictable tarball path.
`tools/build-release-tarball` respects `OUTPUT_DIR`, not `OUTDIR`.
2022-07-21 11:42:18 -07:00
Tim Abbott
64f6e7f612 i18n: Update translation data from Transifex. 2022-07-14 16:26:44 -07:00
Alex Vandiver
a6779e99e5 version: Update version after 5.4 release. 2022-07-12 06:21:47 +00:00
Alex Vandiver
5e78618309 Release Zulip Server 5.4. 5.4 2022-07-12 05:34:08 +00:00
Mateusz Mandera
305c13faeb test_import_export: Test exclusion of private uploads from realm export. 2022-07-12 04:36:16 +00:00
Anders Kaseorg
c6a5903280 CVE-2022-31134: Exclude private attachments from realm exports.
Zulip Server 2.1.0 and above have a UI tool, accessible only to server
owners and server administrators, which provides a way to download a
“public data” export. While this export tool is only accessible to
administrators, in many configurations server administrators are not
expected to have access to private messages and private
streams. However, the “public data” export which administrators could
generate contained the attachment contents for all attachments, even
those from private messages and streams.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-12 04:36:14 +00:00
Anders Kaseorg
82adae451e email_notifications: Give absolute path to html2text.
Our uWSGI configuration doesn’t correctly activate our virtualenv.  We
should investigate that, but until we do, we need to invoke html2text
by an absolute path.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 7c992422f0)
2022-07-07 17:08:22 -07:00
Anders Kaseorg
3f0919cc65 markdown: Parse included blocks in a new parser state.
This fixes inclusion of a multi-paragraph file into a list item.

Followup to commit dc33a0ae67 (#22315).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 869fe60689)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
e61ffc5bd7 integrations: Satisfy Python-Markdown’s archaic 4-space requirement.
Followup to commit dc33a0ae67 (#22315).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit a2e1d61172)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
a303c27a16 tornado: Send request_started signal in Django thread.
Django’s ASGIHandler does this too and it seems like a good idea.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit a7e10ee47e)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
6b3399d7e6 markdown: Rewrite include plugin without markdown-include.
markdown-include is GPL licensed.

Also, rewrite it as a block processor, so that it works correctly
inside indented blocks.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit dc33a0ae67)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
ad692da6aa markdown: Rename preprocessor_priorities module to priorities.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 7f0e11bd06)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
5ebfb6aae5 check-thirdparty: License under GPLv2+.
Since python-debian is GPL licensed, our script that imports it should
arguably be GPL licensed as well.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit e069330084)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
cc1244afa3 mattermost: Run html2text as a subprocess.
html2text is GPL licensed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit f3254bb558)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
b6c8acbf14 email_notifications: Run html2text as a subprocess.
html2text is GPL licensed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit e10b7f2f3c)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
82155e15a5 tornado: Fix race condition on handler._request.
Commit 6fd1a558b7 (#21469) introduced an
await point where get_events_backend calls fetch_events in order to
switch threads.  This opened the possibility that, in the window
between the connect_handler call in fetch_events and the old location
of this assignment in get_events_backend, an event could arrive,
causing ClientDescriptor.add_event to crash on missing
handler._request.  Fix this by assigning handler._request earlier.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit e112b619cc)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
c9e00e6391 test_tornado: Call process_event on first fetch_events return.
The 0.1 second delay was sometimes not long enough to guarantee we hit
the async response path, resulting in a nondeterministic coverage
failure.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 0430705d13)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
51d0886f60 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 9ee636e920)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
c74f3c247c requirements: Remove importlib-resources.
It’s only used by jsonschema >= 4.2.0, but current semgrep holds
jsonschema ~= 3.2:
https://github.com/returntocorp/semgrep/issues/4739

Not bothering to bump PROVISION_VERSION because it’s not important
whether this backport is installed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b0592ade63)
2022-07-07 13:31:32 -07:00
Anders Kaseorg
86a37e6956 requirements: Require boto3-stubs packages only in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 0cf836119b)
2022-07-07 13:31:32 -07:00
Alex Vandiver
5cef03280a requirements: Add boto3-stubs for more AWS libraries.
(cherry picked from commit a45f92edb5)
2022-07-07 13:31:32 -07:00