mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
13 lines
430 B
JavaScript
13 lines
430 B
JavaScript
const previewService = require("./previewService");
|
|||
|
|||
/**
|
|||
* VULN: req.query.url (user input) flows through previewService.fetchUrl()
|
|||
* which calls lib.request(url) where lib is dynamically http or https.
|
|||
* Module alias tracking should resolve lib.request → http.request (SSRF sink).
|
|||
*/
|
|||
function handlePreview(req, res) {
|
|||
const url = req.query.url;
|
|||
const result = previewService.fetchUrl(url);
|
|||
res.json(result);
|
|||
}
|