Skip to content

Commit 43ae9c4

Browse files
mcollinaBethGriggs
authored andcommitted
src: drop localhost6 as allowed host for inspector
CVE-ID: CVE-2021-22884 Refs: https://hackerone.com/bugs?report_id=1069487 PR-URL: nodejs-private/node-private#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>
1 parent 9fc96f4 commit 43ae9c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/inspector_socket.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,7 @@ class HttpHandler : public ProtocolHandler {
580580
bool IsAllowedHost(const std::string& host_with_port) const {
581581
std::string host = TrimPort(host_with_port);
582582
return host.empty() || IsIPAddress(host)
583-
|| node::StringEqualNoCase(host.data(), "localhost")
584-
|| node::StringEqualNoCase(host.data(), "localhost6");
583+
|| node::StringEqualNoCase(host.data(), "localhost");
585584
}
586585

587586
bool parsing_value_;

0 commit comments

Comments
 (0)