diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-04 03:54:18 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-04 03:54:18 +0300 |
commit | 9f8e07ff3fc7dc361e8d760f8f4535645ac056e6 (patch) | |
tree | 9328333b940f2f788db090dfd3791bb968aa2852 /api/routes/getTr | |
parent | d26ef04bcccc9917b7524548a27cfa189d65d5d0 (diff) | |
download | arching-kaos-tools-9f8e07ff3fc7dc361e8d760f8f4535645ac056e6.tar.gz arching-kaos-tools-9f8e07ff3fc7dc361e8d760f8f4535645ac056e6.tar.bz2 arching-kaos-tools-9f8e07ff3fc7dc361e8d760f8f4535645ac056e6.zip |
XSS something
Diffstat (limited to 'api/routes/getTr')
-rw-r--r-- | api/routes/getTr/index.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/routes/getTr/index.js b/api/routes/getTr/index.js index c3c058f..a7acb55 100644 --- a/api/routes/getTr/index.js +++ b/api/routes/getTr/index.js @@ -24,6 +24,7 @@ function fetchFtr(tr, res){ command.on("close", code => { console.log(`child process exited with code ${code}`); + res.set('Content-Type', 'application/json'); if ( code === 0 ) { const path = config.workDir+"/ftr/"+tr; @@ -44,6 +45,7 @@ function fetchFtr(tr, res){ }; module.exports = (req, res) => { console.log(req.params) + res.set('Content-Type', 'application/json'); if ( (req.params.tr) && req.params.tr.length === 128 ){ regex= /[a-f0-9]{128}/; if (regex.test(req.params.tr)){ |