summary refs log tree commit diff
path: root/tests/rest/media/test_domain_blocking.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Store hashes of media files, and allow quarantining by hash. (#18277)Will Hunt2025-03-271-0/+1
| | | | | | | | | | | | | | | | 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.
* Enable authenticated media by default (#17889)Travis Ralston2024-11-201-1/+3
| | | Co-authored-by: Olivier 'reivilibre <oliverw@matrix.org>
* Fix slipped logging context when media rejected (#17239)Erik Johnston2024-05-291-7/+7
| | | | | | | When a module rejects a piece of media we end up trying to close the same logging context twice. Instead of fixing the existing code we refactor to use an async context manager, which is easier to write correctly.
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Add config option to prevent media downloads from listed domains. (#15197)Travis Ralston2023-05-091-0/+139
This stops media (and thumbnails) from being accessed from the listed domains. It does not delete any already locally cached media, but will prevent accessing it. Note that admin APIs are unaffected by this change.