summary refs log tree commit diff
path: root/scripts-dev/schema_versions.py
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2025-03-27 17:26:34 +0000
committerGitHub <noreply@github.com>2025-03-27 17:26:34 +0000
commitd17295e5c3de642ba2c4e47f1bb2be7b2e4c9c06 (patch)
tree122cff5e2886532fc6d52dc5d48d36d3c2523070 /scripts-dev/schema_versions.py
parentAdd DB delta to remove the old state group deletion job (#18284) (diff)
downloadsynapse-d17295e5c3de642ba2c4e47f1bb2be7b2e4c9c06.tar.xz
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.
Diffstat (limited to 'scripts-dev/schema_versions.py')
0 files changed, 0 insertions, 0 deletions