fix: Ensure font serving does not reflect userdata-derived errors as HTML (#647)

* fix: ensure font serving does not reflect userdata-derived errors as HTML

Signed-off-by: Michael Nutt <michael@nuttnet.net>
This commit is contained in:
Michael Nutt
2022-11-24 11:07:11 -05:00
committed by GitHub
parent c134795b81
commit a7af45ee3f
5 changed files with 12 additions and 6 deletions
+4 -1
View File
@@ -54,7 +54,10 @@ export const serve_data = {
if (/does not exist/.test(err.message)) {
return res.status(204).send();
} else {
return res.status(500).send(err.message);
return res
.status(500)
.header('Content-Type', 'text/plain')
.send(err.message);
}
} else {
if (data == null) {