Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hashtag column options styling #14247

Merged
merged 2 commits into from Jul 6, 2020

Conversation

ClearlyClaire
Copy link
Contributor

The advanced options of the hashtag column uses react-select, which unfortunately generates its CSS rules dynamically using the emotion framework, which means it dynamically creates a CSS stylesheet from Javascript, which is broken with our current Content-Security-Policy.

This PR adds support for nonce-based stylesheets and passes the stylesheet nonce to react-select so it can properly include its stylesheet.

This require some monkey-patching of Rails.

@ClearlyClaire ClearlyClaire marked this pull request as ready for review July 6, 2020 21:52
@Gargron Gargron merged commit a783bdf into mastodon:master Jul 6, 2020
ashfurrow added a commit to ashfurrow/mastodon that referenced this pull request Jan 25, 2021
This reverts commit a783bdf.

The CSP for mastodon.technology is permissive enough to prevent the bug fixed in mastodon#14247, so the nonce approach is unnecessary. In fact, it breaks some users' custom scripts. m.t appeals to coders so we should let them use browser extensions.
shouo1987 pushed a commit to CrossGate-Pawoo/mastodon that referenced this pull request Dec 7, 2022
* Enable nonces for stylesheets

* Pass nonce to react-select
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants