mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-07 21:15:39 -05:00
[PR #2624] [MERGED] Fix issue with CSP and icon redirects #19956
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/2624
Author: @BlackDex
Created: 7/17/2022
Status: ✅ Merged
Merged: 7/17/2022
Merged by: @dani-garcia
Base:
main← Head:fix-2623-csp-icon-redirect📝 Commits (1)
0f95bdcFix issue with CSP and icon redirects📊 Changes
3 files changed (+47 additions, -32 deletions)
View changed files
📝
src/api/icons.rs(+3 -21)📝
src/config.rs(+32 -0)📝
src/util.rs(+12 -11)📄 Description
When using anything else but the
internalicon service it wouldtrigger an CSP block because the redirects were not allowed.
This PR fixes #2623 by dynamically adding the needed CSP strings.
This should also work with custom services.
For Google i needed to add an extra check because that does a redirect
it self to there gstatic.com domain.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.