1
0
Fork 0
forked from svrjs/svrjs

Update to SVR.JS 3.12.3

This commit is contained in:
Dorian Niemiec 2023-12-30 23:50:11 +01:00
parent 27e62da887
commit 4928ac1d2c
7 changed files with 21 additions and 22 deletions

View file

@ -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

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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 charset="UTF-8" />
<style>
@ -12,7 +12,7 @@
</style>
</head>
<body>
<h1>Welcome to SVR.JS 3.12.2</h1>
<h1>Welcome to SVR.JS 3.12.3</h1>
<br/>
<img src="/logo.png" style="width: 256px;" />
<br/>
@ -134,9 +134,8 @@
</div>
<p>Changes:</p>
<ul>
<li>SVR.JS now refuses to start with misconfigured SNI in order to prevent ReDoS vulnerabilities.</li>
<li>Add <i>Host</i> header pre-processing.</li>
<li>Changed SNI regular expression generation function.</li>
<li>Removed all remnants of "DorianTech".</li>
<li>Fixed bug with wildcard in domain name selectors.</li>
</ul>
<br/>
<a href="/tests.html">Tests</a><br/>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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 charset="UTF-8" />
<style>
@ -12,12 +12,12 @@
</style>
</head>
<body>
<h1>SVR.JS 3.12.2 Licenses</h1>
<h2>SVR.JS 3.12.2</h2>
<h1>SVR.JS 3.12.3 Licenses</h1>
<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;">
MIT License<br/>
<br/>
Copyright (c) 2020-2023 DorianTech<br/>
Copyright (c) 2018-2024 SVR.JS<br/>
<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/>
@ -37,7 +37,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
SOFTWARE.<br/>
</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="float: right;">License: MIT</div>
<div style="font-size: 20px;">

14
svr.js
View file

@ -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.");

View file

@ -1,6 +1,6 @@
</div>
<div class="footer">
Copyright &copy; 2020 DorianTech S.A.
Copyright &copy; 2020-2024 SVR.JS
</div>
</body>
</html>

View file

@ -1,6 +1,6 @@
</div>
<div class="footer">
Copyright &copy; 2020 DorianTech S.A.
Copyright &copy; 2020-2024 SVR.JS
</div>
</body>
</html>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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 charset="UTF-8" />
<style>
@ -12,7 +12,7 @@
</style>
</head>
<body>
<h1>SVR.JS 3.12.2 Tests</h1>
<h1>SVR.JS 3.12.3 Tests</h1>
<h2>Directory (without trailing slash)</h2>
<iframe src="/testdir" width="50%" height="300px"></iframe>
<h2>Directory (with query)</h2>