-
Notifications
You must be signed in to change notification settings - Fork 129
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
Allow components to use unsafe image urls #218
Comments
Hi @stasusov It is not about the sanitizing I think, it could be caused of |
@MurhafSousli, thank you. You are right, the For example, trustCss(imageUrl: string) {
return this._sanitizer.bypassSecurityTrustStyle(imageUrl);
} images are shown correctly. This is acceptable in terms of security in my case (using gallerize directive), because if url is unsafe, I'll receive a warning from Angular on the step of adding it (to the Does this explanation make any sense? UPD: I've just noticed that the same component (gallery-image) already uses sanitizer to bypass check for custom HTML, so the library is responsible for a safety issue. Maybe this can help you somehow. |
…-to-use-unsafe-urls MurhafSousli#218: Allow gallery-image component to use unsafe urls
…-to-use-unsafe-urls MurhafSousli#218: Fix the type of variable
#218: Allow gallery-image component to use unsafe urls
Fixed in 4.0.0 beta |
What is the expected behavior?
Allow components to use image urls that are not safe
What is the current behavior?
Images accessed by unsafe url are not displayed when used in
<gallery-image><gallery-image>
What are the steps to reproduce?
https://stackblitz.com/edit/ngx-gallery-avkn7t
bypassSecurityTrustUrl()
) "unsafe" url to [src]gallerize
directive for the container of<img>
tagsWhat is the use-case or motivation for changing an existing behavior?
If developer passed image url through
bypassSecurityTrustUrl()
, it should be shown.Which versions are you using for the following packages?
Angular: 6
Angular CDK: 6.4.7
Angular CLI: 6.0.0
Typescript: 2.7.2
Gallery: 3.3.1
The text was updated successfully, but these errors were encountered: