[jira] [Commented] (HTTPCLIENT-2248) Async HTTP/2 with SOCKS and HTTPS fails
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17635788#comment-17635788 ] Ricardo Pereira commented on HTTPCLIENT-2248: - [~olegk] works as expected with the proxies I tested earlier both HTTP and HTTPS, with and without name resolution. Thank you! > Async HTTP/2 with SOCKS and HTTPS fails > --- > > Key: HTTPCLIENT-2248 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2248 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (async) >Affects Versions: 5.2 >Reporter: Ricardo Pereira >Priority: Major > > Running the following: > {code:java} > try (CloseableHttpAsyncClient httpclient = > HttpAsyncClients.customHttp2() > .setIOReactorConfig( > IOReactorConfig.custom() > .setSocksProxyAddress(new > InetSocketAddress("127.0.0.1", 9150)) > .build()) > .build()) { > httpclient.start(); > final HttpHost target = new HttpHost("https", "nghttp2.org"); > final SimpleHttpRequest request = > > SimpleRequestBuilder.get().setHttpHost(target).setPath("/httpbin/ip").build(); > System.out.println("Executing request " + request); > final Future future = > httpclient.execute( > SimpleRequestProducer.create(request), > SimpleResponseConsumer.create(), > new FutureCallback() { > @Override > public void completed(final SimpleHttpResponse > response) { > System.out.println(request + "->" + new > StatusLine(response)); > System.out.println(response.getBody()); > } > @Override > public void failed(final Exception ex) { > System.out.println(request + "->" + ex); > } > @Override > public void cancelled() { > System.out.println(request + " cancelled"); > } > }); > future.get(); > } > {code} > Results in: > {noformat} > Executing request GET https://nghttp2.org/httpbin/ip > GET https://nghttp2.org/httpbin/ip->javax.net.ssl.SSLHandshakeException: TLS > handshake failed > Exception in thread "main" java.util.concurrent.ExecutionException: > javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) > at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85) > at > org.apache.hc.client5.http.examples.AsyncH2Socks.main(AsyncH2Socks.java:77) > Caused by: javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.updateEventMask(SSLIOSession.java:454) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.setEventMask(SSLIOSession.java:791) > at > org.apache.hc.core5.reactor.SocksProxyProtocolHandler.inputReady(SocksProxyProtocolHandler.java:242) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:624) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202) > at > org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:142) > at > org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) > at > org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86) > at > org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) > at java.base/java.lang.Thread.run(Thread.java:829) > {noformat} > If the scheme is changed to HTTP it succeeds: > {noformat} > Executing request GET http://nghttp2.org/httpbin/ip > GET http://nghttp2.org/httpbin/ip->HTTP/2.0 200 OK > SimpleBody{content length=32, content type=application/json} > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Commented] (HTTPCLIENT-2248) Async HTTP/2 with SOCKS and HTTPS fails
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17635472#comment-17635472 ] Ricardo Pereira commented on HTTPCLIENT-2248: - [~olegk] will do, thank you! > Async HTTP/2 with SOCKS and HTTPS fails > --- > > Key: HTTPCLIENT-2248 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2248 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (async) >Affects Versions: 5.2 >Reporter: Ricardo Pereira >Priority: Major > > Running the following: > {code:java} > try (CloseableHttpAsyncClient httpclient = > HttpAsyncClients.customHttp2() > .setIOReactorConfig( > IOReactorConfig.custom() > .setSocksProxyAddress(new > InetSocketAddress("127.0.0.1", 9150)) > .build()) > .build()) { > httpclient.start(); > final HttpHost target = new HttpHost("https", "nghttp2.org"); > final SimpleHttpRequest request = > > SimpleRequestBuilder.get().setHttpHost(target).setPath("/httpbin/ip").build(); > System.out.println("Executing request " + request); > final Future future = > httpclient.execute( > SimpleRequestProducer.create(request), > SimpleResponseConsumer.create(), > new FutureCallback() { > @Override > public void completed(final SimpleHttpResponse > response) { > System.out.println(request + "->" + new > StatusLine(response)); > System.out.println(response.getBody()); > } > @Override > public void failed(final Exception ex) { > System.out.println(request + "->" + ex); > } > @Override > public void cancelled() { > System.out.println(request + " cancelled"); > } > }); > future.get(); > } > {code} > Results in: > {noformat} > Executing request GET https://nghttp2.org/httpbin/ip > GET https://nghttp2.org/httpbin/ip->javax.net.ssl.SSLHandshakeException: TLS > handshake failed > Exception in thread "main" java.util.concurrent.ExecutionException: > javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) > at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85) > at > org.apache.hc.client5.http.examples.AsyncH2Socks.main(AsyncH2Socks.java:77) > Caused by: javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.updateEventMask(SSLIOSession.java:454) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.setEventMask(SSLIOSession.java:791) > at > org.apache.hc.core5.reactor.SocksProxyProtocolHandler.inputReady(SocksProxyProtocolHandler.java:242) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:624) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202) > at > org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:142) > at > org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) > at > org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86) > at > org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) > at java.base/java.lang.Thread.run(Thread.java:829) > {noformat} > If the scheme is changed to HTTP it succeeds: > {noformat} > Executing request GET http://nghttp2.org/httpbin/ip > GET http://nghttp2.org/httpbin/ip->HTTP/2.0 200 OK > SimpleBody{content length=32, content type=application/json} > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Commented] (HTTPCLIENT-2248) Async HTTP/2 with SOCKS and HTTPS fails
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17632710#comment-17632710 ] Ricardo Pereira commented on HTTPCLIENT-2248: - I tested with two local SOCKS proxies, Tor and one implemented with Netty. The classic client (HTTP/1.1) is able to proxy both HTTP and HTTPS with those proxies (that relying on JRE _socksProxy*_ system properties). fwiw I tried debug the code and it seems the _SSLIOSession_ handler is set before the SOCKS handler has finished connecting to the proxy. > Async HTTP/2 with SOCKS and HTTPS fails > --- > > Key: HTTPCLIENT-2248 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2248 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (async) >Affects Versions: 5.2 >Reporter: Ricardo Pereira >Priority: Major > > Running the following: > {code:java} > try (CloseableHttpAsyncClient httpclient = > HttpAsyncClients.customHttp2() > .setIOReactorConfig( > IOReactorConfig.custom() > .setSocksProxyAddress(new > InetSocketAddress("127.0.0.1", 9150)) > .build()) > .build()) { > httpclient.start(); > final HttpHost target = new HttpHost("https", "nghttp2.org"); > final SimpleHttpRequest request = > > SimpleRequestBuilder.get().setHttpHost(target).setPath("/httpbin/ip").build(); > System.out.println("Executing request " + request); > final Future future = > httpclient.execute( > SimpleRequestProducer.create(request), > SimpleResponseConsumer.create(), > new FutureCallback() { > @Override > public void completed(final SimpleHttpResponse > response) { > System.out.println(request + "->" + new > StatusLine(response)); > System.out.println(response.getBody()); > } > @Override > public void failed(final Exception ex) { > System.out.println(request + "->" + ex); > } > @Override > public void cancelled() { > System.out.println(request + " cancelled"); > } > }); > future.get(); > } > {code} > Results in: > {noformat} > Executing request GET https://nghttp2.org/httpbin/ip > GET https://nghttp2.org/httpbin/ip->javax.net.ssl.SSLHandshakeException: TLS > handshake failed > Exception in thread "main" java.util.concurrent.ExecutionException: > javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) > at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85) > at > org.apache.hc.client5.http.examples.AsyncH2Socks.main(AsyncH2Socks.java:77) > Caused by: javax.net.ssl.SSLHandshakeException: TLS handshake failed > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.updateEventMask(SSLIOSession.java:454) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.setEventMask(SSLIOSession.java:791) > at > org.apache.hc.core5.reactor.SocksProxyProtocolHandler.inputReady(SocksProxyProtocolHandler.java:242) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:624) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74) > at > org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202) > at > org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:142) > at > org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) > at > org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) > at > org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86) > at > org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) > at java.base/java.lang.Thread.run(Thread.java:829) > {noformat} > If the scheme is changed to HTTP it succeeds: > {noformat} > Executing request GET http://nghttp2.org/httpbin/ip > GET http://nghttp2.org/httpbin/ip->HTTP/2.0 200 OK > SimpleBody{content length=32, content type=application/json} > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To
[jira] [Created] (HTTPCLIENT-2248) Async HTTP/2 with SOCKS and HTTPS fails
Ricardo Pereira created HTTPCLIENT-2248: --- Summary: Async HTTP/2 with SOCKS and HTTPS fails Key: HTTPCLIENT-2248 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2248 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpClient (async) Affects Versions: 5.2 Reporter: Ricardo Pereira Running the following: {code:java} try (CloseableHttpAsyncClient httpclient = HttpAsyncClients.customHttp2() .setIOReactorConfig( IOReactorConfig.custom() .setSocksProxyAddress(new InetSocketAddress("127.0.0.1", 9150)) .build()) .build()) { httpclient.start(); final HttpHost target = new HttpHost("https", "nghttp2.org"); final SimpleHttpRequest request = SimpleRequestBuilder.get().setHttpHost(target).setPath("/httpbin/ip").build(); System.out.println("Executing request " + request); final Future future = httpclient.execute( SimpleRequestProducer.create(request), SimpleResponseConsumer.create(), new FutureCallback() { @Override public void completed(final SimpleHttpResponse response) { System.out.println(request + "->" + new StatusLine(response)); System.out.println(response.getBody()); } @Override public void failed(final Exception ex) { System.out.println(request + "->" + ex); } @Override public void cancelled() { System.out.println(request + " cancelled"); } }); future.get(); } {code} Results in: {noformat} Executing request GET https://nghttp2.org/httpbin/ip GET https://nghttp2.org/httpbin/ip->javax.net.ssl.SSLHandshakeException: TLS handshake failed Exception in thread "main" java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: TLS handshake failed at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85) at org.apache.hc.client5.http.examples.AsyncH2Socks.main(AsyncH2Socks.java:77) Caused by: javax.net.ssl.SSLHandshakeException: TLS handshake failed at org.apache.hc.core5.reactor.ssl.SSLIOSession.updateEventMask(SSLIOSession.java:454) at org.apache.hc.core5.reactor.ssl.SSLIOSession.setEventMask(SSLIOSession.java:791) at org.apache.hc.core5.reactor.SocksProxyProtocolHandler.inputReady(SocksProxyProtocolHandler.java:242) at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:624) at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74) at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202) at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:142) at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178) at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127) at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86) at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) at java.base/java.lang.Thread.run(Thread.java:829) {noformat} If the scheme is changed to HTTP it succeeds: {noformat} Executing request GET http://nghttp2.org/httpbin/ip GET http://nghttp2.org/httpbin/ip->HTTP/2.0 200 OK SimpleBody{content length=32, content type=application/json} {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Reopened] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira reopened HTTPCLIENT-1383: - Sorry to bother you again with this. It's still possible to get the authentication to enter in infinite loop (happens in both trunk and branch 4.2.x). NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1383_patch_tests, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1383: Attachment: HTTPCLIENT-1383_patch_tests_non_unicode Attached a patch (for trunk) with some changes to the NTLM tests: - Adds a new test which enters in infinite loop (uses a non unicode NTLM challenge message); - Minor changes to use the same response handler (that sends only challenge messages). NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1383_patch_tests, HTTPCLIENT-1383_patch_tests_non_unicode, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Closed] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira closed HTTPCLIENT-1383. --- Tested with both the latest trunk and branch 4.2.x with no problems. Once again, thank you. NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1383_patch_tests, HTTPCLIENT-1383_patch_tests_non_unicode, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1380) NTLMEngineImpl: Change exception message to be informative
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1380: Affects Version/s: (was: 4.3 Beta3) 4.2.5 NTLMEngineImpl: Change exception message to be informative -- Key: HTTPCLIENT-1380 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1380 Project: HttpComponents HttpClient Issue Type: Improvement Components: HttpAuth Affects Versions: 4.2.5, Snapshot Reporter: Ricardo Pereira Priority: Trivial The class NTLMEngineImpl throws an exception when the NTLM server sends the challenge message with the field NTLMSSP_NEGOTIATE_UNICODE set to 0, but the exception message says NTLM type 2 message has flags that make no sense: . The message gives no clue to what the problem is and forces the user to check the source code if (s)he wants to know why the exception was thrown. Consider changing the exception message to report what the problem really is. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Closed] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira closed HTTPCLIENT-1383. --- Tested with both the latest trunk and branch 4.2.x with no problems. Thank you. NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1383_patch_tests, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Closed] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira closed HTTPCLIENT-1381. --- Tested with both the latest trunk and branch 4.2.x with no problems. Thank you. NullPointerException during NTLM authentication using null workstation/domain - Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1381_patch_tests, wire.log Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Reopened] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira reopened HTTPCLIENT-1381: - Tested with both the latest trunk and branch 4.2.x. There are still some NPE when it's used the NTLMv2 authentication. NullPointerException during NTLM authentication using null workstation/domain - Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1381_patch_tests, wire.log Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1381: Attachment: HTTPCLIENT-1381_patch_tests Attached a patch (for trunk) with some changes to the NTLM tests: - Adds a new (failing) test which uses NTLMv2 challenge message; - Minor changes to use the same response handler; - Renames some classes/methods (adds Message to Type2 and adds the version); - Changes the NTLMv1 challenge message since it was not correctly Base64 encoded (didn't affect the tests, though). NullPointerException during NTLM authentication using null workstation/domain - Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1381_patch_tests, wire.log Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Reopened] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira reopened HTTPCLIENT-1383: - Tested with both the latest trunk and branch 4.2.x. The original issue is fixed but, even if not likely to happen, it's still possible to get the authentication to enter in infinite loop. NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1383: Attachment: HTTPCLIENT-1383_patch_tests Attached a patch (for trunk) with some changes to the NTLM tests: - Adds a new test which enters in infinite loop (the difference is that the first answer is already a challenge message); - Adds a new response handler that answers only with challenge messages. NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Fix For: 4.2.6, 4.3 Beta3 Attachments: ClientNtlmProxyAuthentication.java, HTTPCLIENT-1383_patch_tests, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Commented] (HTTPCLIENT-1258) NTLM authentication fails for local accounts
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13700665#comment-13700665 ] Ricardo Pereira commented on HTTPCLIENT-1258: - Note that I've raised the new issue: HTTPCLIENT-1381 (might be appropriate to comment there too) NTLM authentication fails for local accounts Key: HTTPCLIENT-1258 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1258 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: 4.2.1 Reporter: Øystein Grimstad Fix For: 4.2.3 Authenticating to a windows PC using a local account (administrator) fails. In this case, the domain property should be NULL. Setting domain=null fails with a nullpointerexception Setting domain= fails with a wrong username/password JCIFS does not have this issue and can be used as a workaround -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Created] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
Ricardo Pereira created HTTPCLIENT-1383: --- Summary: NTLM authentication can enter in infinite loop Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1383) NTLM authentication can enter in infinite loop
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1383: Attachment: wire.log ClientNtlmProxyAuthentication.java Attached the wire log and the code used to produce it (client/server heavily based on HttpClient/HttpCore examples). The example allows one authentication attempt, after that it returns always the challenge message (it stops after 8 requests). Tested with latest httpclient/httpcore trunk (revision 1500032). NTLM authentication can enter in infinite loop -- Key: HTTPCLIENT-1383 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1383 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Attachments: ClientNtlmProxyAuthentication.java, wire.log If the NTLM proxy sends, always, a challenge message the authentication enters in infinite loop. This happened with an user account that got suspended because of too many failed authentication attempts, after that the server started to send, always, the (same) challenge message causing an infinite loop with the HttpClient. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Commented] (HTTPCLIENT-1258) NTLM authentication fails for local accounts
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13699076#comment-13699076 ] Ricardo Pereira commented on HTTPCLIENT-1258: - The NPE is still happening in trunk (thus 4.3). Should a new issue be raised to fix that? NTLM authentication fails for local accounts Key: HTTPCLIENT-1258 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1258 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: 4.2.1 Reporter: Øystein Grimstad Fix For: 4.2.3 Authenticating to a windows PC using a local account (administrator) fails. In this case, the domain property should be NULL. Setting domain=null fails with a nullpointerexception Setting domain= fails with a wrong username/password JCIFS does not have this issue and can be used as a workaround -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Created] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
Ricardo Pereira created HTTPCLIENT-1381: --- Summary: NullPointerException during NTLM authentication using null workstation/domain Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Priority: Minor Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ricardo Pereira updated HTTPCLIENT-1381: Attachment: ClientNtlmProxyAuthentication.java wire.log Attached the wire log and the code used to produce it (client/server heavily based on HttpClient/HttpCore examples). Used httpclient/httpcore trunk (revision 1499617). NullPointerException during NTLM authentication using null workstation/domain - Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Attachments: ClientNtlmProxyAuthentication.java, wire.log Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Comment Edited] (HTTPCLIENT-1381) NullPointerException during NTLM authentication using null workstation/domain
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13699708#comment-13699708 ] Ricardo Pereira edited comment on HTTPCLIENT-1381 at 7/4/13 2:09 AM: - Attached the wire log and the code used to produce it (client/server heavily based on HttpClient/HttpCore examples). Tested with httpclient/httpcore trunk (revision 1499617). was (Author: thc202): Attached the wire log and the code used to produce it (client/server heavily based on HttpClient/HttpCore examples). Used httpclient/httpcore trunk (revision 1499617). NullPointerException during NTLM authentication using null workstation/domain - Key: HTTPCLIENT-1381 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1381 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpAuth Affects Versions: Snapshot Reporter: Ricardo Pereira Attachments: ClientNtlmProxyAuthentication.java, wire.log Using NTCredentials with null workstation or null domain leads to a NullPointerException during the NTLM authentication. The workaround is to use an empty String for both the workstation and domain. Exception stack trace of an attempt to authenticate with null workstation: Exception in thread main java.lang.NullPointerException at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:186) at org.apache.http.impl.auth.NTLMEngineImpl.convertHost(NTLMEngineImpl.java:194) at org.apache.http.impl.auth.NTLMEngineImpl.access$14(NTLMEngineImpl.java:193) at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.init(NTLMEngineImpl.java:970) at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:139) at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1608) at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:129) at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:251) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:176) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:77) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:101) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:115) at ClientNtlmProxyAuthentication.main(ClientNtlmProxyAuthentication.java:70) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Created] (HTTPCLIENT-1380) NTLMEngineImpl: Change exception message to be informative
Ricardo Pereira created HTTPCLIENT-1380: --- Summary: NTLMEngineImpl: Change exception message to be informative Key: HTTPCLIENT-1380 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1380 Project: HttpComponents HttpClient Issue Type: Improvement Components: HttpAuth Affects Versions: 4.3 Beta3, Snapshot Reporter: Ricardo Pereira Priority: Trivial The class NTLMEngineImpl throws an exception when the NTLM server sends the challenge message with the field NTLMSSP_NEGOTIATE_UNICODE set to 0, but the exception message says NTLM type 2 message has flags that make no sense: . The message gives no clue to what the problem is and forces the user to check the source code if (s)he wants to know why the exception was thrown. Consider changing the exception message to report what the problem really is. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org