1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-31 03:45:13 +00:00
synapse/tests
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
..
api Consolidate SSO redirects through /_matrix/client/v3/login/sso/redirect(/{idpId}) (#17972) 2024-11-29 11:26:37 -06:00
app Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
appservice Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
config Add worker_replication_secret_path config option (#18191) 2025-02-26 15:55:10 +00:00
crypto Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
events Never autojoin deactivated & suspended users. (#18073) 2025-01-28 00:37:24 +00:00
federation Add caching support to media endpoints (#18235) 2025-03-13 16:28:19 +00:00
handlers Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
http Fix mypy errors on Twisted 24.11.0 (#17998) 2024-12-18 11:49:38 +00:00
logging Removal: Remove support for experimental msc3886 (#17638) 2024-11-13 14:10:20 +00:00
media Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
metrics Cleanup Python 3.8 leftovers (#17967) 2025-02-10 16:53:24 +00:00
module_api Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
push MSC4076: Add disable_badge_count to pusher configuration (#17975) 2024-12-03 22:58:43 +00:00
replication Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
rest Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
scripts Update license headers 2023-11-21 15:29:58 -05:00
server_notices Sliding Sync: Add cache to get_tags_for_room(...) (#17730) 2024-09-19 12:43:26 +01:00
state Update license headers 2023-11-21 15:29:58 -05:00
storage Delete unreferenced state groups in background (#18254) 2025-03-21 17:09:49 +00:00
test_utils Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
types Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
util Cleanup Python 3.8 leftovers (#17967) 2025-02-10 16:53:24 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py Removal: Remove support for experimental msc3886 (#17638) 2024-11-13 14:10:20 +00:00
test_distributor.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_event_auth.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_mau.py Update license headers 2023-11-21 15:29:58 -05:00
test_phone_home.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Removal: Remove support for experimental msc3886 (#17638) 2024-11-13 14:10:20 +00:00
test_state.py Add locking to more safely delete state groups: Part 1 (#18107) 2025-02-03 17:29:15 +00:00
test_terms_auth.py Update license headers 2023-11-21 15:29:58 -05:00
test_test_utils.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_types.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_visibility.py Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
unittest.py Cleanup Python 3.8 leftovers (#17967) 2025-02-10 16:53:24 +00:00
utils.py Cleanup Python 3.8 leftovers (#17967) 2025-02-10 16:53:24 +00:00