mirror of
https://github.com/therootcompany/greenlock.js.git
synced 2024-11-16 17:29:00 +00:00
Compare commits
No commits in common. "108e59ef8baba8af79d3681990f559629b57d8aa" and "781a735146c5bf4d2e5b4e79bd849dddb76ae828" have entirely different histories.
108e59ef8b
...
781a735146
9
index.js
9
index.js
@ -521,13 +521,8 @@ Greenlock.create = function (gl) {
|
|||||||
if (req.socket && 'string' === typeof req.socket.servername) {
|
if (req.socket && 'string' === typeof req.socket.servername) {
|
||||||
if (safehost && (safehost !== req.socket.servername.toLowerCase())) {
|
if (safehost && (safehost !== req.socket.servername.toLowerCase())) {
|
||||||
res.statusCode = 400;
|
res.statusCode = 400;
|
||||||
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
res.end("Don't be frontin', yo!"
|
||||||
res.end(
|
+ " TLS SNI '" + req.socket.servername.toLowerCase() + "' does not match 'Host: " + safehost + "'");
|
||||||
"<h1>Domain Fronting Error</h1>"
|
|
||||||
+ "<p>This connection was secured using TLS/SSL for '" + req.socket.servername.toLowerCase() + "'</p>"
|
|
||||||
+ "<p>The HTTP request specified 'Host: " + safehost + "', which is (obviously) different.</p>"
|
|
||||||
+ "<p>Because this looks like a domain fronting attack, the connection has been terminated.</p>"
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (safehost && !gl.middleware.sanitizeHost._skip_fronting_check) {
|
} else if (safehost && !gl.middleware.sanitizeHost._skip_fronting_check) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "greenlock",
|
"name": "greenlock",
|
||||||
"version": "2.4.4",
|
"version": "2.4.3",
|
||||||
"description": "Let's Encrypt for node.js on npm",
|
"description": "Let's Encrypt for node.js on npm",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user