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

Automatically add favicon host to CSP if present #1891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HeySora
Copy link

@HeySora HeySora commented Jan 14, 2025

Fixes #1890

  • Tested with an empty favicon URL (-> No difference)
  • Tested with a relative favicon URL (e.g. /favicon.ico) (-> No difference)
  • Tested with an absolute favicon URL (e.g. https://my-other-domain.com/favicon.ico) (-> Adds my-other-domain.com to img-src)
  • Tested with an absolute favicon URL containing a user and password (e.g. https://user:[email protected]/favicon.ico) (-> Correctly adds my-other-domain.com to img-src)
  • Tested with gibberish (e.g. dfkgjhdf) (-> No difference)

@master3395
Copy link

Would this fix the current issue where there's no Favicon at all, even if it has been set?

I have set it like this:
https://newstargeted.com/hotlink-ok/favicon.ico
image

The user page is on the left and the admin page is on the right, with no icon.
image

@HeySora
Copy link
Author

HeySora commented Jan 17, 2025

@master3395 yes, exactly!

the manual fix would be to go in the "Config" tab, look up content_security_policy, and setting its value to img-src newstargeted.com. that PR would solve that issue automatically without this additional step.

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.

Improve experience by automatically appending favicon domain to content_security_policy config
2 participants