We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f4358c commit 4cae3d4Copy full SHA for 4cae3d4
packages/web-console/serve-dist.js
@@ -6,6 +6,11 @@ const path = require("path")
6
const contextPath = process.env.QDB_HTTP_CONTEXT_WEB_CONSOLE || ""
7
8
const server = http.createServer((req, res) => {
9
+ if (path.normalize(decodeURI(req.url)) !== decodeURI(req.url)) {
10
+ res.statusCode = 403;
11
+ res.end();
12
+ return;
13
+ }
14
const { method } = req
15
const baseUrl = "http://" + req.headers.host + contextPath;
16
const reqUrl = new url.URL(req.url, baseUrl);
0 commit comments