Skip to content

Bail out if admin_unsafely_bypass_quarantine was used by a non-admin#19639

Merged
anoadragon453 merged 4 commits intodevelopfrom
anoa/bypass_quarantine_media_return
Apr 17, 2026
Merged

Bail out if admin_unsafely_bypass_quarantine was used by a non-admin#19639
anoadragon453 merged 4 commits intodevelopfrom
anoa/bypass_quarantine_media_return

Conversation

@anoadragon453
Copy link
Copy Markdown
Member

@anoadragon453 anoadragon453 commented Apr 1, 2026

Previously the code would send an error back to the client, but would continue executing and fetch the remote media anyhow.

This isn't too much of an issue, as remote media must already be cached locally in order to quarantine it in the first place.

Introduced in #19275

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

Previously the code would send an error back to the client, but would
continue executing and fetch the remote media anyhow.

This isn't too much of an issue, as remote media must already be cached
locally in order to quarantine it in the first place.
@anoadragon453 anoadragon453 marked this pull request as ready for review April 1, 2026 15:37
@anoadragon453 anoadragon453 requested a review from a team as a code owner April 1, 2026 15:37
Prevent types from being evaluated at runtime. The alternative to just quoting the type.
@anoadragon453 anoadragon453 merged commit a9361c4 into develop Apr 17, 2026
46 checks passed
@anoadragon453 anoadragon453 deleted the anoa/bypass_quarantine_media_return branch April 17, 2026 15:27
access_token=non_admin_user_tok,
await_result=False,
)
self.pump()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whats the need for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants