mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Make NodeJSLib use moduleMember for ES6-compatibility
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { createServer } from 'http';
|
||||
import { parse } from 'url';
|
||||
import { join } from 'path';
|
||||
|
||||
var server = createServer(function(req, res) {
|
||||
let path = parse(req.url, true).query.path;
|
||||
|
||||
// BAD: This could read any file on the file system
|
||||
res.write(readFileSync(join("public", path)));
|
||||
});
|
||||
@@ -1,3 +1,4 @@
|
||||
| TaintedPath-es6.js:10:26:10:45 | join("public", path) | This path depends on $@. | TaintedPath-es6.js:7:20:7:26 | req.url | a user-provided value |
|
||||
| TaintedPath.js:12:29:12:32 | path | This path depends on $@. | TaintedPath.js:9:24:9:30 | req.url | a user-provided value |
|
||||
| TaintedPath.js:15:29:15:48 | "/home/user/" + path | This path depends on $@. | TaintedPath.js:9:24:9:30 | req.url | a user-provided value |
|
||||
| TaintedPath.js:19:33:19:36 | path | This path depends on $@. | TaintedPath.js:9:24:9:30 | req.url | a user-provided value |
|
||||
|
||||
Reference in New Issue
Block a user