Last active
August 29, 2015 14:20
-
-
Save Sebmaster/07c69d56a81128a7ec16 to your computer and use it in GitHub Desktop.
JS weirdness
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
%00.com | |
%00.com | |
exec 7 %00.com %00.com 7 %00.com | |
exec3 |
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
%00.com | |
<NULL>.com | |
exec 7 %00.com | |
exec2 |
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
console.log(input); | |
let domain = decodeURIComponent(input); | |
console.log(decodeURIComponent(input)); | |
console.log("exec", input.length, input, decodeURIComponent(input), domain.length, domain); | |
if (domain.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1) { | |
console.log("exec2"); | |
throw new TypeError("Invalid Host"); | |
} | |
console.log("exec3"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment