Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Allow local media to be marked as safe from being quarantined #7718

Merged
merged 16 commits into from
Jun 22, 2020

Conversation

clokep
Copy link
Member

@clokep clokep commented Jun 17, 2020

Should be reviewable commit by commit, but this:

  • Combines some logic that was duplicated (can split this to a separate PR if it makes it easier).
  • Adds a column to local_media_repository to keep a piece of media from being quarantined.
  • Modifies the quarantine logic to use the above flag.
  • Adds tests.

Fixes #4988

@clokep clokep force-pushed the clokep/safe-from-quarantine branch from 951717b to fd3ea1d Compare June 18, 2020 18:49
@clokep clokep requested a review from a team June 19, 2020 14:00
@clokep
Copy link
Member Author

clokep commented Jun 19, 2020

Note that there's no way to set this right now (e.g. no admin API), and no way to check the status of this flag...is that OK right now?

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its fine to leave require database hacking to use this for now

synapse/storage/data_stores/main/media_repository.py Outdated Show resolved Hide resolved
tests/rest/admin/test_admin.py Outdated Show resolved Hide resolved
tests/rest/admin/test_admin.py Outdated Show resolved Hide resolved
Co-authored-by: Erik Johnston <erik@matrix.org>
@clokep clokep merged commit 95e41f3 into develop Jun 22, 2020
@clokep clokep deleted the clokep/safe-from-quarantine branch June 22, 2020 12:04
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit 'dc80a0762':
  1.16.0rc1
  Back out MSC2625 implementation (#7761)
  Additional configuration options for auto-join rooms (#7763)
  Add some metrics for inbound and outbound federation processing times (#7755)
  Explain the purpose of the "tests" conditional dependency requirement (#7751)
  Add another yield point to state res v2 (#7746)
  Move flake8 to end. Don't exit script on failure (#7738)
  Make tox actions work on Debian 10 (#7703)
  Yield during large v2 state res. (#7735)
  add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)
  Set Content-Length for Metrics requests (#7730)
  Sync ignored table names in synapse_port_db to current database schema (#7717)
  Allow local media to be marked as safe from being quarantined. (#7718)
  Convert directory handler to async/await (#7727)
  Speed up state res v2 across large state differences. (#7725)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/admin/quarantine_media destroys stickerpacks
2 participants