1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-04-06 01:43:29 +00:00
synapse/tests/media
Will Hunt d17295e5c3
Store hashes of media files, and allow quarantining by hash. (#18277)
This PR makes a few radical changes to media. This now stores the SHA256
hash of each file stored in the database (excluding thumbnails, more on
that later). If a set of media is quarantined, any additional uploads of
the same file contents or any other files with the same hash will be
quarantined at the same time.

Currently this does NOT:
 - De-duplicate media, although a future extension could be to do that.
- Run any background jobs to identify the hashes of older files. This
could also be a future extension, though the value of doing so is
limited to combat the abuse of recent media.
- Hash thumbnails. It's assumed that thumbnails are parented to some
form of media, so you'd likely be wanting to quarantine the media and
the thumbnail at the same time.
2025-03-27 17:26:34 +00:00
..
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_base.py Update license headers 2023-11-21 15:29:58 -05:00
test_filepath.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_html_preview.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_media_retention.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_media_storage.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_oembed.py Bump mypy from 1.10.1 to 1.11.2 (#17842) 2024-10-17 15:05:00 +00:00
test_url_previewer.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00