Repository navigation
csp: allow data: and blob: images so Safari and Firefox can draw - #264
Closed
jseifeddine wants to merge 1 commit into
Closed
jseifeddine wants to merge 1 commit into
jseifeddine wants to merge 1 commit into
Conversation
This was referenced Oct 12, 2026
The Content-Security-Policy had no img-src, so default-src 'self' governed images and refused the data: URIs the Guacamole client draws every tile from on browsers without WebCodecs ImageDecoder. Safari and Firefox rendered SSH and RDP sessions black with only rect fills and the cursor cell showing; Chrome decodes straight from the stream and never fetches a URL, which hid it. The same directive blocks the remote mouse cursor (cursor: url(data:...)) and blob: image URLs. Move the policy into a documented constant, add img-src 'self' data: blob:, and add a unit test that fails if img-src loses either source. Document the proxy-side header replacement for releases up to v1.10.5. Fixes sol1#249
jseifeddine
force-pushed
the
fix/csp-img-src
branch
from
October 12, 2026 04:20
db9ed40 to
04597c2
Compare
Member
|
Merged into main as cb425ee, thanks Jad. This one fixed more than Safari and Firefox: the remote pointer from v1.10.2 is a data: image too, so it was being refused in every browser. Verified on our canary, 7 CSP violations per session down to 0. It'll go out in the next release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #249.
Safari and Firefox (no WebCodecs
ImageDecoder) draw every Guacamole tile from adata:URI. The Content-Security-Policy had noimg-src, sodefault-src 'self'refused them and SSH/RDP sessions rendered black with only rect fills and the cursor cell showing. Chrome decodes from the stream and never fetches a URL, which hid it. The same gap blocked the remote mouse cursor andblob:images.img-src 'self' data: blob:added; the policy moves into a documented constant.docs/reverse-proxies.md: the proxy-side header replacement for releases up to v1.10.5.Testing
test_csp_allows_data_and_blob_imagesfails if either source is dropped.securitypolicyviolationwithblockedURI: "data"in the console.