Skip to content

Commit 1564752

Browse files
mcollinarichardlau
authored andcommittedFeb 22, 2021
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 e69177a commit 1564752

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

Diff for: ‎src/inspector_socket.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,7 @@ class HttpHandler : public ProtocolHandler {
584584
bool IsAllowedHost(const std::string& host_with_port) const {
585585
std::string host = TrimPort(host_with_port);
586586
return host.empty() || IsIPAddress(host)
587-
|| node::StringEqualNoCase(host.data(), "localhost")
588-
|| node::StringEqualNoCase(host.data(), "localhost6");
587+
|| node::StringEqualNoCase(host.data(), "localhost");
589588
}
590589

591590
bool parsing_value_;

0 commit comments

Comments
 (0)
Please sign in to comment.