-
-
Save isaacs/2315571 to your computer and use it in GitHub Desktop.
Safe Javascript semicolons
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
var http = require('http');;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
//////;/* /* /* make sure to *really* comment your comments.*******************/ | |
http.createServer(function (request, response) {;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;response.writeHead(200, {'Content-Type': 'text/plain'});;;;;;;;;;;;;;;;;;;;;;; | |
;;response.end('Hello World\n');;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
}).listen(8124);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
console.log('Server running at http://127.0.0.1:8124/');;;;;;;;;;;;;;;;;;;;;;;;; | |
//////;/* /* /* FIX ISSUE #11245532 - WHITESPACE ADDED - 2012-04-05 isaacs ****/ | |
Need to increase whitespace for readability.
@polotek fixed. Thanks for reporting.
for extra safety, make sure your payload complies too.
before:
;;response.end('Hello World\n');;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
after:
;;response.end('Hello World;\n');;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Probably a good idea to escape the asterisks around really
in your comment as well.
//////;/* /* /* make sure to \u002Areally\u002A comment your comments.*******************/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I agonized over whether to do that. I decided to leave it whitespaced
Sorry to kill this joke with death-by-analysis.