mirror of
https://github.com/therootcompany/greenlock.js.git
synced 2024-11-16 17:29:00 +00:00
Compare commits
No commits in common. "2cfba7a2e714319c13679d18b07fba7946b0912e" and "992a684a286447cfbe45801f215e982c85280ef5" have entirely different histories.
2cfba7a2e7
...
992a684a28
17
index.js
17
index.js
@ -517,27 +517,10 @@ Greenlock.create = function (gl) {
|
|||||||
req.headers.host = host.join(':');
|
req.headers.host = host.join(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gl.__sni_allow_fronting) {
|
|
||||||
if (req.socket && 'string' === typeof req.socket.servername) {
|
|
||||||
if (safehost && (safehost !== req.socket.servername.toLowerCase())) {
|
|
||||||
res.statusCode = 400;
|
|
||||||
res.end("Don't be frontin', yo!"
|
|
||||||
+ " TLS SNI '" + req.socket.servername.toLowerCase() + "' does not match 'Host: " + safehost + "'");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (safehost && !gl.middleware.sanitizeHost._skip_fronting_check) {
|
|
||||||
// TODO how to handle wrapped sockets, as with telebit?
|
|
||||||
console.warn("\n\n\n[greenlock] WARN: no string for req.socket.servername,"
|
|
||||||
+ " skipping fronting check for '" + safehost + "'\n\n\n");
|
|
||||||
gl.middleware.sanitizeHost._skip_fronting_check = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// carry on
|
// carry on
|
||||||
realNext();
|
realNext();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
gl.middleware.sanitizeHost._skip_fronting_check = false;
|
|
||||||
|
|
||||||
return gl;
|
return gl;
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "greenlock",
|
"name": "greenlock",
|
||||||
"version": "2.4.1",
|
"version": "2.3.13",
|
||||||
"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