forked from svrjs/svrjs
Update to SVR.JS 3.12.3
This commit is contained in:
parent
27e62da887
commit
4928ac1d2c
7 changed files with 21 additions and 22 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>SVR.JS 3.12.2</title>
|
<title>SVR.JS 3.12.3</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<style>
|
<style>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Welcome to SVR.JS 3.12.2</h1>
|
<h1>Welcome to SVR.JS 3.12.3</h1>
|
||||||
<br/>
|
<br/>
|
||||||
<img src="/logo.png" style="width: 256px;" />
|
<img src="/logo.png" style="width: 256px;" />
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -134,9 +134,8 @@
|
||||||
</div>
|
</div>
|
||||||
<p>Changes:</p>
|
<p>Changes:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>SVR.JS now refuses to start with misconfigured SNI in order to prevent ReDoS vulnerabilities.</li>
|
<li>Removed all remnants of "DorianTech".</li>
|
||||||
<li>Add <i>Host</i> header pre-processing.</li>
|
<li>Fixed bug with wildcard in domain name selectors.</li>
|
||||||
<li>Changed SNI regular expression generation function.</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="/tests.html">Tests</a><br/>
|
<a href="/tests.html">Tests</a><br/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>SVR.JS 3.12.2 Licenses</title>
|
<title>SVR.JS 3.12.3 Licenses</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<style>
|
<style>
|
||||||
|
@ -12,12 +12,12 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>SVR.JS 3.12.2 Licenses</h1>
|
<h1>SVR.JS 3.12.3 Licenses</h1>
|
||||||
<h2>SVR.JS 3.12.2</h2>
|
<h2>SVR.JS 3.12.3</h2>
|
||||||
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
|
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
|
||||||
MIT License<br/>
|
MIT License<br/>
|
||||||
<br/>
|
<br/>
|
||||||
Copyright (c) 2020-2023 DorianTech<br/>
|
Copyright (c) 2018-2024 SVR.JS<br/>
|
||||||
<br/>
|
<br/>
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
|
Permission is hereby granted, free of charge, to any person obtaining a copy<br/>
|
||||||
of this software and associated documentation files (the "Software"), to deal<br/>
|
of this software and associated documentation files (the "Software"), to deal<br/>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
|
||||||
SOFTWARE.<br/>
|
SOFTWARE.<br/>
|
||||||
</div>
|
</div>
|
||||||
<h2>Packages used by SVR.JS 3.12.2</h2>
|
<h2>Packages used by SVR.JS 3.12.3</h2>
|
||||||
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
|
||||||
<div style="float: right;">License: MIT</div>
|
<div style="float: right;">License: MIT</div>
|
||||||
<div style="font-size: 20px;">
|
<div style="font-size: 20px;">
|
||||||
|
|
14
svr.js
14
svr.js
|
@ -5,8 +5,8 @@
|
||||||
// //
|
// //
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
////// DorianTech SVR.JS //////
|
///// SVR.JS /////
|
||||||
//////web server running on Node.JS//////
|
/////a web server running on Node.JS/////
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
/*
|
/*
|
||||||
* MIT License
|
* 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:
|
* 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 os = require("os");
|
||||||
var version = "3.12.2";
|
var version = "3.12.3";
|
||||||
var singlethreaded = false;
|
var singlethreaded = false;
|
||||||
|
|
||||||
if (process.versions) process.versions.svrjs = version; // Inject SVR.JS into process.versions
|
if (process.versions) process.versions.svrjs = version; // Inject SVR.JS into process.versions
|
||||||
|
@ -556,7 +556,7 @@ function checkForEnabledDirectoryListing(hostname) {
|
||||||
return true;
|
return true;
|
||||||
} else if (hostname && hostnameM.indexOf("*.") == 0 && hostnameM != "*.") {
|
} else if (hostname && hostnameM.indexOf("*.") == 0 && hostnameM != "*.") {
|
||||||
var hostnamesRoot = hostnameM.substr(2);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (hostname && hostname == hostnameM) {
|
} else if (hostname && hostname == hostnameM) {
|
||||||
|
@ -2778,7 +2778,7 @@ if (!cluster.isPrimary) {
|
||||||
return true;
|
return true;
|
||||||
} else if (req.headers.host && hostname.indexOf("*.") == 0 && hostname != "*.") {
|
} else if (req.headers.host && hostname.indexOf("*.") == 0 && hostname != "*.") {
|
||||||
var hostnamesRoot = hostname.substr(2);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (req.headers.host && req.headers.host == hostname) {
|
} else if (req.headers.host && req.headers.host == hostname) {
|
||||||
|
@ -4841,7 +4841,7 @@ function start(init) {
|
||||||
if (init) {
|
if (init) {
|
||||||
for (i = 0; i < logo.length; i++) console.log(logo[i]); // Print logo
|
for (i = 0; i < logo.length; i++) console.log(logo[i]); // Print logo
|
||||||
console.log();
|
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
|
// Print warnings
|
||||||
if (version.indexOf("Nightly-") === 0) serverconsole.locwarnmessage("This version is only for test purposes and may be unstable.");
|
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.");
|
if (svrmodpackUsed) serverconsole.locwarnmessage("The \"svrmodpack\" library is deprecated. Mods using svrmodpack format may not work in future SVR.JS versions.");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Copyright © 2020 DorianTech S.A.
|
Copyright © 2020-2024 SVR.JS
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Copyright © 2020 DorianTech S.A.
|
Copyright © 2020-2024 SVR.JS
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>SVR.JS 3.12.2 Tests</title>
|
<title>SVR.JS 3.12.3 Tests</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<style>
|
<style>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>SVR.JS 3.12.2 Tests</h1>
|
<h1>SVR.JS 3.12.3 Tests</h1>
|
||||||
<h2>Directory (without trailing slash)</h2>
|
<h2>Directory (without trailing slash)</h2>
|
||||||
<iframe src="/testdir" width="50%" height="300px"></iframe>
|
<iframe src="/testdir" width="50%" height="300px"></iframe>
|
||||||
<h2>Directory (with query)</h2>
|
<h2>Directory (with query)</h2>
|
||||||
|
|
Reference in a new issue