[Security][Bug] Prevent binding to all TCP interfaces (#5752)
This commit is contained in:
committed by
GitHub
parent
a68ed76682
commit
683707c314
@@ -225,7 +225,8 @@ class MessageQueue:
|
||||
remote_subscribe_port = get_open_port()
|
||||
if is_valid_ipv6_address(connect_ip):
|
||||
self.remote_socket.setsockopt(IPV6, 1)
|
||||
socket_addr = f"tcp://*:{remote_subscribe_port}"
|
||||
connect_ip = f"[{connect_ip}]"
|
||||
socket_addr = f"tcp://{connect_ip}:{remote_subscribe_port}"
|
||||
self.remote_socket.bind(socket_addr)
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user