mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Added test case for escape.
This commit is contained in:
@@ -208,3 +208,10 @@ var server = http.createServer(function(req, res) {
|
||||
}
|
||||
});
|
||||
|
||||
var srv = http.createServer(function(req, res) {
|
||||
let path = url.parse(req.url, true).query.path; // $ MISSING: Source
|
||||
const improperEscape = escape(path);
|
||||
res.write(fs.readFileSync(improperEscape)); // $ MISSING: Alert
|
||||
const improperEscape2 = unescape(path);
|
||||
res.write(fs.readFileSync(improperEscape2)); // $ MISSING: Alert
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user