mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
11 lines
347 B
JavaScript
11 lines
347 B
JavaScript
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; // $ Source
|
|
|
|
res.write(readFileSync(join("public", path))); // $ Alert - This could read any file on the file system
|
|
});
|