diff --git a/LICENSE b/LICENSE index ad694af..f382250 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2023 DorianTech +Copyright (c) 2018-2024 SVR.JS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/index.html b/index.html index 295e255..a6ead8e 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ - SVR.JS 3.12.2 + SVR.JS 3.12.3 -

Welcome to SVR.JS 3.12.2

+

Welcome to SVR.JS 3.12.3



@@ -134,9 +134,8 @@

Changes:


Tests
diff --git a/licenses/index.html b/licenses/index.html index 568c744..621a55b 100644 --- a/licenses/index.html +++ b/licenses/index.html @@ -1,7 +1,7 @@ - SVR.JS 3.12.2 Licenses + SVR.JS 3.12.3 Licenses -

SVR.JS 3.12.2 Licenses

-

SVR.JS 3.12.2

+

SVR.JS 3.12.3 Licenses

+

SVR.JS 3.12.3

MIT License

- Copyright (c) 2020-2023 DorianTech
+ Copyright (c) 2018-2024 SVR.JS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -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.12.2

+

Packages used by SVR.JS 3.12.3

License: MIT
diff --git a/svr.js b/svr.js index 06eccce..dfdde33 100644 --- a/svr.js +++ b/svr.js @@ -5,8 +5,8 @@ // // ///////////////////////////////////////// ///////////////////////////////////////// -////// DorianTech SVR.JS ////// -//////web server running on Node.JS////// +///// SVR.JS ///// +/////a web server running on Node.JS///// ///////////////////////////////////////// ///////////////////////////////////////// @@ -14,7 +14,7 @@ /* * MIT License * - * Copyright (c) 2020-2023 DorianTech + * Copyright (c) 2018-2024 SVR.JS * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * @@ -80,7 +80,7 @@ function deleteFolderRecursive(path) { } var os = require("os"); -var version = "3.12.2"; +var version = "3.12.3"; var singlethreaded = false; if (process.versions) process.versions.svrjs = version; // Inject SVR.JS into process.versions @@ -556,7 +556,7 @@ function checkForEnabledDirectoryListing(hostname) { return true; } else if (hostname && hostnameM.indexOf("*.") == 0 && hostnameM != "*.") { var hostnamesRoot = hostnameM.substr(2); - if (hostname == hostnamesRoot || hostname.indexOf("." + hostnamesRoot) == hostname.length - hostnamesRoot.length - 1) { + if (hostname == hostnamesRoot || (hostname.length > hostnamesRoot.length && hostname.indexOf("." + hostnamesRoot) == hostname.length - hostnamesRoot.length - 1)) { return true; } } else if (hostname && hostname == hostnameM) { @@ -2778,7 +2778,7 @@ if (!cluster.isPrimary) { return true; } else if (req.headers.host && hostname.indexOf("*.") == 0 && hostname != "*.") { var hostnamesRoot = hostname.substr(2); - if (req.headers.host == hostnamesRoot || req.headers.host.indexOf("." + hostnamesRoot) == req.headers.host.length - hostnamesRoot.length - 1) { + if (req.headers.host == hostnamesRoot || (req.headers.host.length > hostnamesRoot.length && req.headers.host.indexOf("." + hostnamesRoot) == req.headers.host.length - hostnamesRoot.length - 1)) { return true; } } else if (req.headers.host && req.headers.host == hostname) { @@ -4841,7 +4841,7 @@ function start(init) { if (init) { for (i = 0; i < logo.length; i++) console.log(logo[i]); // Print logo console.log(); - console.log("Welcome to DorianTech SVR.JS server."); + console.log("Welcome to SVR.JS - a web server running on Node.JS"); // Print warnings if (version.indexOf("Nightly-") === 0) serverconsole.locwarnmessage("This version is only for test purposes and may be unstable."); if (svrmodpackUsed) serverconsole.locwarnmessage("The \"svrmodpack\" library is deprecated. Mods using svrmodpack format may not work in future SVR.JS versions."); diff --git a/testdir/.personalized/FOOT.html b/testdir/.personalized/FOOT.html index dd34732..b9ef4f4 100644 --- a/testdir/.personalized/FOOT.html +++ b/testdir/.personalized/FOOT.html @@ -1,6 +1,6 @@
diff --git a/testdir/.personalized/folder/FOOT.html b/testdir/.personalized/folder/FOOT.html index dd34732..b9ef4f4 100644 --- a/testdir/.personalized/folder/FOOT.html +++ b/testdir/.personalized/folder/FOOT.html @@ -1,6 +1,6 @@
diff --git a/tests.html b/tests.html index 60b1c3a..75248be 100644 --- a/tests.html +++ b/tests.html @@ -1,7 +1,7 @@ - SVR.JS 3.12.2 Tests + SVR.JS 3.12.3 Tests -

SVR.JS 3.12.2 Tests

+

SVR.JS 3.12.3 Tests

Directory (without trailing slash)

Directory (with query)