Commit Graph

46969 Commits

Author SHA1 Message Date
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
Alex Vandiver
bb3cc8eae8 release: Write a tool to automate final release checks and steps.
(cherry picked from commit c915400101)
2022-07-07 13:19:36 -07:00
Alex Vandiver
2e7738470f build-release-tarball: Use OUTPUT_DIR environment variable, if set.
(cherry picked from commit d9958618a9)
2022-07-07 13:19:36 -07:00
Alex Vandiver
b5d75b9dba build-release-tarball: Verify full releases are tagged and pushed.
This ensures that anything that looks like a full release will
identify itself as such.  It requires that the version have a tag at
the current commit (though it doesn't need to be pushed yet), as well
as the commits exist in `main` or a release branch in the remote.

(cherry picked from commit 2d132bf342)
2022-07-07 13:19:36 -07:00
Alex Vandiver
f604124622 docs: Specify which CPU architectures are supported.
Fixes: #22310.
(cherry picked from commit 68c4b708a0)
2022-07-05 17:25:40 -07:00
Alex Vandiver
0e613f724f docs: Document that loadbalancer.ips can be CIDR ranges.
(cherry picked from commit f9b7b8e5d9)
2022-06-28 14:59:06 -07:00
Alex Vandiver
2aa3695d41 upload-release: Only copy full releases to zulip-server-latest.tar.gz.
`zulip-server-6.0-pre0.tar.gz` should not be copied to
`zulip-server-latest.tar.gz`.

(cherry picked from commit 6cd4d907ba)
2022-06-23 20:38:48 -07:00
Alex Vandiver
214df3ea1f compilemessages: Use a consistent ordering for the languages list.
This makes the generated data more consistent.

(cherry picked from commit 160a8b9945)
2022-06-23 23:25:51 +00:00
Alex Vandiver
a4134e183f version: Update version after 5.3 release. 2022-06-21 20:46:28 +00:00
Alex Vandiver
3c7fdf8a82 Release Zulip Server 5.3. 5.3 2022-06-21 20:25:50 +00:00
Anders Kaseorg
b031537fe9 CVE-2022-31017: Fix edit event exposure in protected-history streams.
When editing an old message in a private stream with protected
history, the server would incorrectly send an API event including the
edited message to all of the stream’s current subscribers, including
those who should not have access to the old message. This API event is
ignored by official clients, so it could only be observed by a user
using a modified client or their browser’s developer tools.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-21 18:23:30 +00:00
Alex Vandiver
9d3fb85897 install/upgrade: Allow new packages during apt-get upgrade.
`postgresql-14.4` is a notable upgrade in the PostgreSQL series, as it
fixes potential database corruption from `CREATE INDEX CONCURRENTLY`
statements which are run while rows are modified[1].  However, it also
requires an upgrade from `libllvm9` to `libllvm10`, which means it is
not installed by a mere `apt-get upgrade`.

Add the `--with-new-pkgs` flag to all of the potentially relevant
`apt-get upgrade` calls, so that this (and similar) packages are
upgraded successfully.

[1]: https://www.postgresql.org/docs/release/14.4/

(cherry picked from commit a35af3f38b)
2022-06-21 11:22:39 -07:00
Mateusz Mandera
b5e64dd1ef get_old_unclaimed_attachments: Add docstring explaining the logic.
(cherry picked from commit a671ae9749)
2022-06-20 11:13:24 -07:00