zulip/zerver/views
Alex Vandiver e29a455b2d avatars: Encode version into the filename.
Hash the salt, user-id, and now avatar version into the filename.
This allows the URL contents to be immutable, and thus to be marked as
immutable and cacheable.  Since avatars are served unauthenticated,
hashing with a server-side salt makes the current and past avatars not
enumerable.

This requires plumbing the current (or future) avatar version through
various parts of the upload process.

Since this already requires a full migration of current avatars, also
take the opportunity to fix the missing `.png` on S3 uploads (#12852).

We switch from SHA-1 to SHA-256, but truncate it such that avatar URL
data does not substantially increase in size.

Fixes: #12852.
2024-07-07 14:40:07 -07:00
..
development zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
__init__.py
alert_words.py alert_words: Migrate alert_words to use @typed_endpoint. 2023-09-08 08:20:17 -07:00
attachments.py attachments: Correct attachment_id type from string to integer. 2023-10-22 17:06:34 -07:00
auth.py portico_error_pages: Collect zerver error pages into a folder. 2024-06-05 09:06:44 -07:00
compatibility.py django: Use HttpRequest.headers. 2022-05-13 20:42:20 -07:00
custom_profile_fields.py custom_profile: Convert to typed_endpoint. 2024-06-19 18:29:28 -07:00
digest.py
documentation.py documentation: Convert to typed_endpoint. 2024-06-25 11:07:03 -07:00
drafts.py drafts: Migrate drafts to use @typed_endpoint. 2023-09-08 08:20:17 -07:00
email_mirror.py decorator: Rename internal_notify_view. 2024-02-15 15:42:50 -08:00
errors.py config_error: Support passing arguments specifying the "go back" link. 2024-03-05 11:53:51 -08:00
events_register.py presence: Backend implementation of the last_update_id API. 2024-06-06 17:25:54 -07:00
health.py views: Add a /health healthcheck endpoint. 2023-09-20 09:53:59 -07:00
home.py portico_error_pages: Collect zerver error pages into a folder. 2024-06-05 09:06:44 -07:00
invite.py invites: Add option to receive notification on accepted invitations. 2024-07-05 17:14:45 -07:00
message_edit.py messages: Remove use of @overload in access_message. 2024-04-12 11:41:27 -07:00
message_fetch.py narrow: Use NarrowParameter instead of dictionary. 2024-06-20 12:22:37 -07:00
message_flags.py narrow: Use NarrowParameter instead of dictionary. 2024-06-20 12:22:37 -07:00
message_send.py message-type: Add support for "channel" as value for type parameter. 2024-04-11 09:40:25 -07:00
muted_users.py bots: Fix muting of cross realm bots. 2023-11-27 16:16:23 -08:00
onboarding_steps.py onboarding: Migrate to typed_endpoint. 2024-06-14 11:24:36 -07:00
presence.py presence: Backend implementation of the last_update_id API. 2024-06-06 17:25:54 -07:00
push_notifications.py push_notifs: Rename PushDeviceToken.GCM to FCM. 2024-06-17 18:22:59 -07:00
reactions.py reactions: Migrate to typed_endpoint. 2024-04-21 11:09:32 -07:00
read_receipts.py requirements: Upgrade Python requirements. 2024-06-27 15:31:43 -07:00
realm.py realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00
realm_domains.py models: Extract zerver.models.realms. 2023-12-16 22:08:44 -08:00
realm_emoji.py ruff: Fix SIM300 Yoda conditions are discouraged. 2024-01-29 10:41:54 -08:00
realm_export.py realm_export: Use .count(), instead of len(). 2024-04-13 21:50:42 -07:00
realm_icon.py ruff: Fix SIM300 Yoda conditions are discouraged. 2024-01-29 10:41:54 -08:00
realm_linkifiers.py models: Extract zerver.models.linkifiers. 2023-12-16 22:08:44 -08:00
realm_logo.py ruff: Fix SIM300 Yoda conditions are discouraged. 2024-01-29 10:41:54 -08:00
realm_playgrounds.py realm_playgrounds: Refactor error handling for validation on creation. 2023-07-24 17:40:59 -07:00
registration.py portico_error_pages: Collect zerver error pages into a folder. 2024-06-05 09:06:44 -07:00
report.py csp_violations: Migrate has_request_variables to typed_endpoint. 2024-03-08 11:26:00 -08:00
scheduled_messages.py i18n: Update translated errors for stream to channel rename. 2024-04-24 14:35:05 -07:00
sentry.py python: Use urlsplit instead of urlparse. 2023-12-05 13:03:07 -08:00
storage.py storage: Migrate to typed_endpoint. 2024-06-14 11:24:36 -07:00
streams.py groups: Use NamedUserGroup for all queries. 2024-04-26 17:03:09 -07:00
submessage.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
thumbnail.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
tutorial.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
typing.py typing: Migrate to typed_endpoint. 2024-06-14 10:58:35 -07:00
unsubscribe.py black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
upload.py avatars: Encode version into the filename. 2024-07-07 14:40:07 -07:00
user_groups.py openapi: Reorder group-setting-value oneOf clause. 2024-06-25 15:37:31 -07:00
user_settings.py upload: Remove redundant acting_user_profile argument. 2024-06-26 16:43:11 -07:00
user_topics.py user_topics: Migrate to typed_endpoint. 2024-06-06 16:50:56 -07:00
users.py avatars: Encode version into the filename. 2024-07-07 14:40:07 -07:00
video_calls.py models: Replace realm.uri with realm.url. 2024-05-08 11:12:43 -07:00
zephyr.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00