diff --git a/index.html b/index.html
index 7a8b047..69bec33 100644
--- a/index.html
+++ b/index.html
@@ -1,7 +1,7 @@
- SVR.JS 3.4.39
+ SVR.JS 3.4.40
- Welcome to SVR.JS 3.4.39
+ Welcome to SVR.JS 3.4.40
@@ -119,8 +119,7 @@
Changes:
- - Invalid compression exclusion list regexes no longer crash SVR.JS.
- - Fixed multiple XSS vulnerabilities.
+ - SVR.JS now refuses to start with misconfigured SNI in order to prevent ReDoS vulnerabilities.
Tests
diff --git a/licenses/index.html b/licenses/index.html
index 54d37a2..b6daaab 100644
--- a/licenses/index.html
+++ b/licenses/index.html
@@ -1,7 +1,7 @@
- SVR.JS 3.4.39 Licenses
+ SVR.JS 3.4.40 Licenses
- SVR.JS 3.4.39 Licenses
- SVR.JS 3.4.39
+ SVR.JS 3.4.40 Licenses
+ SVR.JS 3.4.40
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.39 and utilities
+ Packages used by SVR.JS 3.4.40 and utilities
License: MIT
diff --git a/svr.js b/svr.js
index 028f285..77ca7e5 100644
--- a/svr.js
+++ b/svr.js
@@ -71,7 +71,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
-var version = "3.4.39";
+var version = "3.4.40";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; //Inject SVR.JS into process.versions
@@ -1109,6 +1109,9 @@ if (secure) {
var sniNames = Object.keys(sni);
var sniCredentials = [];
for (var i = 0; i < sniNames.length; i++) {
+ if(typeof sniNames[i] === "string" && sniNames[i].match(/\*[^*.:]*\*[^*.:]*(?:\.|:|$)/)) {
+ throw new Error("Refusing to start, because the current SNI configuration would make the server vulnerable to ReDoS.");
+ }
sniCredentials.push({
name: sniNames[i],
cert: fs.readFileSync((sni[sniNames[i]].cert[0] != "/" && !sni[sniNames[i]].cert.match(/^[A-Z0-9]:\\/)) ? __dirname + "/" + sni[sniNames[i]].cert : sni[sniNames[i]].cert).toString(),
diff --git a/tests.html b/tests.html
index 63d5098..31bb41e 100644
--- a/tests.html
+++ b/tests.html
@@ -1,7 +1,7 @@
-
SVR.JS 3.4.39 Tests
+ SVR.JS 3.4.40 Tests
- SVR.JS 3.4.39 Tests
+ SVR.JS 3.4.40 Tests
Directory
Directory (with query)