Created
August 29, 2016 11:07
-
-
Save yalovek/c10b92a980fc0ff2bb76661fae239719 to your computer and use it in GitHub Desktop.
Check url params for XSS: window.location = 'javascript://a%0aalert%28document.cookie%29'
This file contains 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
window.location.search.substr(1).split('&').map(value => { | |
return value.split('=')[1]; | |
}).filter(value => { | |
const parser = document.createElement('a'); | |
parser.href = value; | |
return parser.protocol === "javascript:"; | |
}).length; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment