From 789fa155751b5ec04e0a0a8d90d771ca0fdc347d Mon Sep 17 00:00:00 2001 From: Dorian Nimemiec Date: Thu, 15 Feb 2024 20:09:10 +0100 Subject: [PATCH] Fixed bug with URLs containing "jsgi-bin" that don't refer to "jsgi-bin" directory in the web root --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2e2a304..62e6825 100644 --- a/index.js +++ b/index.js @@ -233,7 +233,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e executeJSGI("." + a, req, res, dh, jsgiRequestObject); } - if (href.match(new RegExp("/jsgi-bin(?:$|[?#/])",os.platform() == "win32" ? "i" : ""))) { + if (href.match(new RegExp("^/jsgi-bin(?:$|[?#/])",os.platform() == "win32" ? "i" : ""))) { fs.stat("." + decodeURIComponent(href), function (err, stats) { if (!err) { if (!stats.isFile()) {