mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
12 lines
396 B
JavaScript
12 lines
396 B
JavaScript
// Baseline: expression is a compile-time constant. No taint reaches
|
|
// xpath.select so no XPATH_INJECTION finding fires.
|
|
const xpath = require('xpath');
|
|
const { DOMParser } = require('xmldom');
|
|
|
|
function lookup(req, res) {
|
|
const doc = new DOMParser().parseFromString('<root/>');
|
|
const nodes = xpath.select("//user[@role='admin']", doc);
|
|
res.json(nodes);
|
|
}
|
|
|
|
module.exports = lookup;
|