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

Falling back to previewUrl image src about:blank causing CSP violations #2014

Open
dillonstreator opened this issue May 18, 2023 · 1 comment

Comments

@dillonstreator
Copy link

dillonstreator commented May 18, 2023

The AttachmentContainer is falling back to using an image source of about:blank for previewUrl.

previewUrl: attachmentConfigurations[i]?.url || 'about:blank',

previewUrl: attachmentConfiguration?.url || 'about:blank',

This can cause the following CSP violation.

img-src: csp_violation: 'about' blocked by 'img-src' directive

Can we drop this fallback and not render the image if none is provided in the default ImageComponent?

const imageSrc = sanitizeUrl(previewUrl || image_url || thumb_url);

@MartinCupela
Copy link
Contributor

@dillonstreator thank you for reporting the issue. Could you please clarify, where those errors are logged, please?

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

No branches or pull requests

2 participants