File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
msal4j-sdk/src/main/java/com/microsoft/aad/msal4j Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,9 @@ class HttpListener {
26
26
27
27
void startListener (int port , HttpHandler httpHandler ) {
28
28
try {
29
- // since we only allow loopback address, we can use InetAddress.getLoopbackAddress() directly
30
- // why? because currently we are creating Socket using InetSocketAddress(port)
31
- // which is using wildcard address, so it will attempt to bind to all available network interfaces
32
- // that includes private IP like 192.168.x.x, 10.x.x.x, etc.
33
- // which in turns, will trigger the firewall prompt
29
+ //Originally this created a listener on the wildcard address from InetSocketAddress(port), which could cause firewall issues:
34
30
// https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/796
31
+ //Since only loopback addresses are allowed for the flow that uses this listener, we now just use the loopback address instead
35
32
server = HttpServer .create (new InetSocketAddress (InetAddress .getLoopbackAddress (), port ), 0 );
36
33
server .createContext ("/" , httpHandler );
37
34
this .port = server .getAddress ().getPort ();
You can’t perform that action at this time.
0 commit comments