mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
11 lines
382 B
JavaScript
11 lines
382 B
JavaScript
const fs = require('fs'),
|
|
http = require('http'),
|
|
url = require('url');
|
|
|
|
const ROOT = "/var/www/";
|
|
|
|
var server = http.createServer(function(req, res) {
|
|
let filePath = url.parse(req.url, true).query.path; // $ Source
|
|
|
|
res.write(fs.readFileSync(ROOT + filePath, 'utf8')); // $ Alert - This function uses unsanitized input that can read any file on the file system.
|
|
}); |