forked from svrjs/svrjs
Disable server-side script exposure by default.
This commit is contained in:
parent
03b54f94d4
commit
a7185d6c94
4 changed files with 6 additions and 6 deletions
|
@ -3,7 +3,7 @@
|
||||||
"port": 80,
|
"port": 80,
|
||||||
"pubport": 80,
|
"pubport": 80,
|
||||||
"page404": "404.html",
|
"page404": "404.html",
|
||||||
"timestamp": 1693523365373,
|
"timestamp": 1693637517717,
|
||||||
"blacklist": [],
|
"blacklist": [],
|
||||||
"nonStandardCodes": [],
|
"nonStandardCodes": [],
|
||||||
"enableCompression": true,
|
"enableCompression": true,
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"stackHidden": false,
|
"stackHidden": false,
|
||||||
"enableRemoteLogBrowsing": true,
|
"enableRemoteLogBrowsing": true,
|
||||||
"exposeServerVersion": true,
|
"exposeServerVersion": true,
|
||||||
"disableServerSideScriptExpose": false,
|
"disableServerSideScriptExpose": true,
|
||||||
"rewriteMap": [
|
"rewriteMap": [
|
||||||
{
|
{
|
||||||
"definingRegex": "/\\/invoke500\\/\\?/",
|
"definingRegex": "/\\/invoke500\\/\\?/",
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"stackHidden": false,<br/>
|
"stackHidden": false,<br/>
|
||||||
"enableRemoteLogBrowsing": true,<br/>
|
"enableRemoteLogBrowsing": true,<br/>
|
||||||
"exposeServerVersion": true,<br/>
|
"exposeServerVersion": true,<br/>
|
||||||
"disableServerSideScriptExpose": false,<br/>
|
"disableServerSideScriptExpose": true,<br/>
|
||||||
"rewriteMap": [<br/>
|
"rewriteMap": [<br/>
|
||||||
{<br/>
|
{<br/>
|
||||||
"definingRegex": "/\\/invoke500\\/\\?/",<br/>
|
"definingRegex": "/\\/invoke500\\/\\?/",<br/>
|
||||||
|
|
4
svr.js
4
svr.js
|
@ -4643,7 +4643,7 @@ if (!cluster.isPrimary) {
|
||||||
callServerError(403);
|
callServerError(403);
|
||||||
serverconsole.errmessage("Access to SVR.JS script is denied.");
|
serverconsole.errmessage("Access to SVR.JS script is denied.");
|
||||||
return;
|
return;
|
||||||
} else if ((isForbiddenPath(decodedHref, "svrjs") || isForbiddenPath(decodedHref, "serverSideScripts") || isIndexOfForbiddenPath(decodedHref, "serverSideScriptDirectories")) && !isProxy && (configJSON.disableServerSideScriptExpose && configJSON.disableServerSideScriptExpose != undefined)) {
|
} else if ((isForbiddenPath(decodedHref, "svrjs") || isForbiddenPath(decodedHref, "serverSideScripts") || isIndexOfForbiddenPath(decodedHref, "serverSideScriptDirectories")) && !isProxy && (configJSON.disableServerSideScriptExpose || configJSON.disableServerSideScriptExpose === undefined)) {
|
||||||
callServerError(403);
|
callServerError(403);
|
||||||
serverconsole.errmessage("Access to sources is denied.");
|
serverconsole.errmessage("Access to sources is denied.");
|
||||||
return;
|
return;
|
||||||
|
@ -5789,7 +5789,7 @@ function saveConfig() {
|
||||||
if (configJSONobj.stackHidden === undefined) configJSONobj.stackHidden = false;
|
if (configJSONobj.stackHidden === undefined) configJSONobj.stackHidden = false;
|
||||||
if (configJSONobj.enableRemoteLogBrowsing === undefined) configJSONobj.enableRemoteLogBrowsing = true;
|
if (configJSONobj.enableRemoteLogBrowsing === undefined) configJSONobj.enableRemoteLogBrowsing = true;
|
||||||
if (configJSONobj.exposeServerVersion === undefined) configJSONobj.exposeServerVersion = true;
|
if (configJSONobj.exposeServerVersion === undefined) configJSONobj.exposeServerVersion = true;
|
||||||
if (configJSONobj.disableServerSideScriptExpose === undefined) configJSONobj.disableServerSideScriptExpose = false;
|
if (configJSONobj.disableServerSideScriptExpose === undefined) configJSONobj.disableServerSideScriptExpose = true;
|
||||||
if (configJSONobj.allowStatus === undefined) configJSONobj.allowStatus = true;
|
if (configJSONobj.allowStatus === undefined) configJSONobj.allowStatus = true;
|
||||||
if (configJSONobj.rewriteMap === undefined) configJSONobj.rewriteMap = [];
|
if (configJSONobj.rewriteMap === undefined) configJSONobj.rewriteMap = [];
|
||||||
if (configJSONobj.dontCompress === undefined) configJSONobj.dontCompress = [];
|
if (configJSONobj.dontCompress === undefined) configJSONobj.dontCompress = [];
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
33
|
35
|
Reference in a new issue