Skip to content

Commit d1cf6a9

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 0afcb4f commit d1cf6a9

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
@@ -576,8 +576,7 @@ class HttpHandler : public ProtocolHandler {
576576
bool IsAllowedHost(const std::string& host_with_port) const {
577577
std::string host = TrimPort(host_with_port);
578578
return host.empty() || IsIPAddress(host)
579-
|| node::StringEqualNoCase(host.data(), "localhost")
580-
|| node::StringEqualNoCase(host.data(), "localhost6");
579+
|| node::StringEqualNoCase(host.data(), "localhost");
581580
}
582581

583582
bool parsing_value_;

0 commit comments

Comments
 (0)
Please sign in to comment.