mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: drop localhost6 as allowed host for inspector
CVE-ID: CVE-2021-22884 Refs: https://hackerone.com/bugs?report_id=1069487 PR-URL: https://github.com/nodejs-private/node-private/pull/244 Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
93f7f9e805
commit
1ca3f5abcb
1 file changed
+1
-2
@@ -580,8 +580,7 @@ class HttpHandler : public ProtocolHandler {
|
||||
bool IsAllowedHost(const std::string& host_with_port) const {
|
||||
std::string host = TrimPort(host_with_port);
|
||||
return host.empty() || IsIPAddress(host)
|
||||
|| node::StringEqualNoCase(host.data(), "localhost")
|
||||
|| node::StringEqualNoCase(host.data(), "localhost6");
|
||||
|| node::StringEqualNoCase(host.data(), "localhost");
|
||||
}
|
||||
|
||||
bool parsing_value_;
|
||||
|
||||
Reference in new issue
Block a user