-
Notifications
You must be signed in to change notification settings - Fork 27.3k
fix XSS vulnerability in ng-srcset #8975
Conversation
I'm afraid that this PR in not enough. |
It's better now. For example, if you have a |
The travis job fall in timeout. |
02dc2aa
to
fd2d6c0
Compare
if ((nodeName === 'a' && key === 'href') || | ||
(nodeName === 'img' && key === 'src')) { | ||
this[key] = value = $$sanitizeUri(value, key === 'src'); | ||
if ((nodeName === 'a' && key === 'href') || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use 2 spaces instead of tabs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that. It's my first pull request!
Who can restart Travis job ? |
Made a couple of changes to the test and pattern to make sure urls that end with values that look like width/pixel descriptors are not accidentally treated as such. |
Squashed, rebased, and landed at ab80cd9 Thanks for submitting! |
The pleasure was for me. |
Thanks for fixing |
There is a security issue with
ng-srcset
.URIs aren't sanitized.
The behiavor is correct for
ng-src
but not forng-srcset
.The probleme is with
src/ng/compile.js
that ignoresrcset
.Here is the fix.
Laurent Trillaud