1
0
Fork 0
forked from svrjs/svrjs

Update to SVR.JS 3.14.7

This commit is contained in:
Dorian Niemiec 2024-03-19 17:16:13 +01:00
parent 3abc31e2aa
commit c70e078b26
4 changed files with 11 additions and 24 deletions

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.14.6</title>
<title>SVR.JS 3.14.7</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.14.6</h1>
<h1>Welcome to SVR.JS 3.14.7</h1>
<br/>
<img src="/logo.png" style="width: 256px; max-width: 100%;" />
<br/>
@ -85,13 +85,7 @@
</code>
<p>Changes:</p>
<ul style="display: inline-block; margin: 0;">
<li>Added CVE-2024-22019 Node.JS vulnerability warning.</li>
<li>Improved protection against user enumeration in HTTP authentication.</li>
<li>Replaced block list message with generic 403 Forbidden error.</li>
<li>Replaced some instances of "blacklist" with "block list".</li>
<li>Some terminal output is now bold.</li>
<li>Updated SVR.JS log viewer (<i>logviewer.js</i>) and log highlighter (<i>loghighlight.js</i>)</li>
<li>When "block localhost" CLI command is executed, SVR.JS now adds "localhost" to the block list instead of "::ffff:localhost".</li>
<li>Fixed bug with request domain names not showing in server logs.</li>
</ul>
<p>
<a href="/tests.html">Tests</a><br/>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.14.6 Licenses</title>
<title>SVR.JS 3.14.7 Licenses</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<style>
@ -12,8 +12,8 @@
</style>
</head>
<body>
<h1>SVR.JS 3.14.6 Licenses</h1>
<h2>SVR.JS 3.14.6</h2>
<h1>SVR.JS 3.14.7 Licenses</h1>
<h2>SVR.JS 3.14.7</h2>
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
MIT License<br/>
<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.14.6</h2>
<h2>Packages used by SVR.JS 3.14.7</h2>
<div style="width: 100%; max-width: 1280px; margin: auto">
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div>

4
svr.js
View file

@ -69,7 +69,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
var version = "3.14.6";
var version = "3.14.7";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; // Inject SVR.JS into process.versions
@ -3057,7 +3057,7 @@ if (!cluster.isPrimary) {
if (!req.headers.host.match(/^\.+$/)) req.headers.host = req.headers.host.replace(/\.$/g, "");
}
serverconsole.reqmessage("Client " + ((!reqip || reqip == "") ? "[unknown client]" : (reqip + ((reqport && reqport !== 0) && reqport != "" ? ":" + reqport : ""))) + " wants " + (req.method == "GET" ? "content in " : (req.method == "POST" ? "to post content in " : (req.method == "PUT" ? "to add content in " : (req.method == "DELETE" ? "to delete content in " : (req.method == "PATCH" ? "to patch content in " : "to access content using " + req.method + " method in "))))) + ((req.headers.host == undefined || !isProxy) ? "" : req.headers.host) + req.url);
serverconsole.reqmessage("Client " + ((!reqip || reqip == "") ? "[unknown client]" : (reqip + ((reqport && reqport !== 0) && reqport != "" ? ":" + reqport : ""))) + " wants " + (req.method == "GET" ? "content in " : (req.method == "POST" ? "to post content in " : (req.method == "PUT" ? "to add content in " : (req.method == "DELETE" ? "to delete content in " : (req.method == "PATCH" ? "to patch content in " : "to access content using " + req.method + " method in "))))) + ((req.headers.host == undefined || isProxy) ? "" : req.headers.host) + req.url);
if (req.headers["user-agent"] != undefined) serverconsole.reqmessage("Client uses " + req.headers["user-agent"]);
if (oldHostHeader && oldHostHeader != req.headers.host) serverconsole.resmessage("Host name rewritten: " + oldHostHeader + " => " + req.headers.host);

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>SVR.JS 3.14.6 Tests</title>
<title>SVR.JS 3.14.7 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.14.6 Tests</h1>
<h1>SVR.JS 3.14.7 Tests</h1>
<h2>Directory (without trailing slash)</h2>
<iframe src="/testdir" width="50%" height="300px"></iframe>
<h2>Directory (with query)</h2>
@ -21,13 +21,6 @@
<iframe src="/testdir/.personalized" width="50%" height="300px"></iframe>
<h2>404 Error</h2>
<iframe src="/tfhgfhggf" width="50%" height="300px"></iframe>
<!--
THIS TEST IS NO LONGER APPLICABLE
<h2>// Path (500 Error Test)</h2>
<iframe src="//" width="50%" height="300px"></iframe>
-->
<h2>500 Error</h2>
<iframe src="/invoke500.svr" width="50%" height="300px"></iframe>
<h2>Server Side Javascript</h2>
<iframe src="/hello.svr" width="50%" height="300px"></iframe>
<h2>Proxy test</h2>