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 {
2626
2727 void startListener (int port , HttpHandler httpHandler ) {
2828 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:
3430 // 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
3532 server = HttpServer .create (new InetSocketAddress (InetAddress .getLoopbackAddress (), port ), 0 );
3633 server .createContext ("/" , httpHandler );
3734 this .port = server .getAddress ().getPort ();
You can’t perform that action at this time.
0 commit comments