diff --git a/config.json b/config.json
index 07dab3f..88aeac3 100644
--- a/config.json
+++ b/config.json
@@ -16,10 +16,19 @@
"stackHidden": false,
"enableRemoteLogBrowsing": true,
"exposeServerVersion": true,
- "disableServerSideScriptExpose": false,
+ "disableServerSideScriptExpose": true,
"rewriteMap": [
{
- "definingRegex": "/\\/invoke500\\/\\?/",
+ "definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
+ "replacements": [
+ {
+ "regex": "/^\\/serverSideScript\\.js($|[#?])/",
+ "replacement": "/NONEXISTENT_PAGE$1"
+ }
+ ]
+ },
+ {
+ "definingRegex": "/^\\/invoke500\\/\\?/",
"replacements": [
{
"regex": "/\\/invoke500\\/\\?/",
@@ -28,7 +37,7 @@
]
},
{
- "definingRegex": "/\\/invoke500\\/.+\\//",
+ "definingRegex": "/^\\/invoke500\\/.+\\//",
"replacements": [
{
"regex": "/\\/\\?/",
@@ -45,7 +54,7 @@
]
},
{
- "definingRegex": "/\\/invoke500\\/.+/",
+ "definingRegex": "/^\\/invoke500\\/.+/",
"replacements": [
{
"regex": "/\\?/",
@@ -58,7 +67,7 @@
]
},
{
- "definingRegex": "/\\/invoke500\\//",
+ "definingRegex": "/^\\/invoke500\\//",
"replacements": [
{
"regex": "/\\/invoke500\\//",
@@ -67,7 +76,7 @@
]
},
{
- "definingRegex": "/\\/invoke500$/",
+ "definingRegex": "/^\\/invoke500$/",
"replacements": [
{
"regex": "/\\/invoke500/",
@@ -87,4 +96,4 @@
"sni": {},
"disableNonEncryptedServer": false,
"disableToHTTPSRedirect": false
-}
\ No newline at end of file
+}
diff --git a/index.html b/index.html
index fb6ea0a..0183543 100644
--- a/index.html
+++ b/index.html
@@ -1,7 +1,7 @@
- SVR.JS 3.4.25
+ SVR.JS 3.4.26
- Welcome to SVR.JS 3.4.25
+ Welcome to SVR.JS 3.4.26
@@ -41,8 +41,17 @@
"disableServerSideScriptExpose": false,
"rewriteMap": [
{
- "definingRegex": "/\\/invoke500\\/\\?/",
- "replacements": dorians[
+ "definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",
+ "replacements": [
+ {
+ "regex": "/^\\/serverSideScript\\.js($|[#?])/",
+ "replacement": "/NONEXISTENT_PAGE$1"
+ }
+ ]
+ },
+ {
+ "definingRegex": "/^\\/invoke500\\/\\?/",
+ "replacements": [
{
"regex": "/\\/invoke500\\/\\?/",
"replacement": "/invoke500.svr?"
@@ -50,7 +59,7 @@
]
},
{
- "definingRegex": "/\\/invoke500\\/.+\\//",
+ "definingRegex": "/^\\/invoke500\\/.+\\//",
"replacements": [
{
"regex": "/\\/\\?/",
@@ -65,9 +74,9 @@
"replacement": ""
}
]
- },
+ },
3.4.13
{
- "definingRegex": "/\\/invoke500\\/.+/",
+ "definingRegex": "/^\\/invoke500\\/.+/",
"replacements": [
{
"regex": "/\\?/",
@@ -80,7 +89,7 @@
]
},
{
- "definingRegex": "/\\/invoke500\\//",
+ "definingRegex": "/^\\/invoke500\\//",
"replacements": [
{
"regex": "/\\/invoke500\\//",
@@ -89,7 +98,7 @@
]
},
{
- "definingRegex": "/\\/invoke500$/",
+ "definingRegex": "/^\\/invoke500$/",
"replacements": [
{
"regex": "/\\/invoke500/",
@@ -110,8 +119,8 @@
Changes:
- - Improved HTTP authentication error handling.
- - Updated SVR.JS license.
+ - Changed default SVR.JS configuration.
+ - Disabled server-side script exposure by default.
Bugs:
diff --git a/licenses/index.html b/licenses/index.html
index 2973f45..ba99b2e 100644
--- a/licenses/index.html
+++ b/licenses/index.html
@@ -1,7 +1,7 @@
- SVR.JS 3.4.25 Licenses
+ SVR.JS 3.4.26 Licenses
- SVR.JS 3.4.25 Licenses
- SVR.JS 3.4.25
+ SVR.JS 3.4.26 Licenses
+ SVR.JS 3.4.26
MIT License
@@ -37,7 +37,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Packages used by SVR.JS 3.4.25 and utilities
+ Packages used by SVR.JS 3.4.26 and utilities
License: MIT
diff --git a/svr.js b/svr.js
index 18935cc..0a1d0db 100644
--- a/svr.js
+++ b/svr.js
@@ -71,7 +71,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
-var version = "3.4.25";
+var version = "3.4.26";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; //Inject SVR.JS into process.versions
@@ -4003,7 +4003,7 @@ if (!cluster.isPrimary) {
callServerError(403);
serverconsole.errmessage("Access to SVR.JS script is denied.");
return;
- } else if ((checkIfForbiddenPath(decodedHref, "svrjs") || checkIfForbiddenPath(decodedHref, "serverSideScripts") || checkIfIndexOfForbiddenPath(decodedHref, "serverSideScriptDirectories")) && !isProxy && (configJSON.disableServerSideScriptExpose && configJSON.disableServerSideScriptExpose != undefined)) {
+ } else if ((checkIfForbiddenPath(decodedHref, "svrjs") || checkIfForbiddenPath(decodedHref, "serverSideScripts") || checkIfIndexOfForbiddenPath(decodedHref, "serverSideScriptDirectories")) && !isProxy && (configJSON.disableServerSideScriptExpose || configJSON.disableServerSideScriptExpose === undefined)) {
callServerError(403);
serverconsole.errmessage("Access to sources is denied.");
return;
@@ -4808,7 +4808,7 @@ function saveConfig() {
if (configJSONobj.stackHidden === undefined) configJSONobj.stackHidden = false;
if (configJSONobj.enableRemoteLogBrowsing === undefined) configJSONobj.enableRemoteLogBrowsing = 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.rewriteMap === undefined) configJSONobj.rewriteMap = [];
if (configJSONobj.dontCompress === undefined) configJSONobj.dontCompress = [];
diff --git a/tests.html b/tests.html
index a1fd933..3521b7b 100644
--- a/tests.html
+++ b/tests.html
@@ -1,7 +1,7 @@
-
SVR.JS 3.4.25 Tests
+ SVR.JS 3.4.26 Tests
- SVR.JS 3.4.25 Tests
+ SVR.JS 3.4.26 Tests
Directory
Directory (with query)