[jira] [Comment Edited] (WAGON-538) Basic authentication fails if the password contains non-ascii characters

2018-11-11 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/WAGON-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16683002#comment-16683002
 ] 

Michael Osipov edited comment on WAGON-538 at 11/11/18 8:42 PM:


That's weird it is still present in 4.5.x in 
{{RFC2617Scheme#getCredentialsCharset(HttpRequest)}}. Did you enable logging 
and check for the base 64 value?
The SO answer is from The Oleg. I am a core committer of HttpClient too, but 
very low activity.

Can you try to set a break point in your IDE on that spot? It should actually 
have been set, if not this may be a bug in Wagon.

We officially support Basic, Digest and NTLM. The SPNEGO module is broken, see 
my ticket in HTTPCLIENT. I might consider only those three explicitly and make 
the param configurable.


was (Author: michael-o):
That's weird it is still present in 4.5.x in 
{{RFC2617Scheme#getCredentialsCharset(HttpRequest)}}. Did you enable logging 
and check for the base 64 value?
The SO answer is from The Oleg. I am a core committer of HttpClient too, but 
very low activity.

Can you try to set a break point in your IDE on that spot? It should actually 
have been set, if not this may be a bug in Wagon.

> Basic authentication fails if the password contains non-ascii characters
> 
>
> Key: WAGON-538
> URL: https://issues.apache.org/jira/browse/WAGON-538
> Project: Maven Wagon
>  Issue Type: Bug
>Reporter: Aleksander Gjermundsen
>Priority: Major
>
> If the username and/or password used to authenticate to Nexus contains 
> non-ascii characters, the authentication fails with an access denied error. 
> After using Wireshark to investigate the headers being sent (in my case "Ø", 
> any non-ascii characters are replaced with "?".
> To test, I have used the following configuration:
> {code:java}
> http://maven.apache.org/SETTINGS/1.0.0;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
> http://maven.apache.org/xsd/settings-1.0.0.xsd;>
> ...
> 
> 
> artifactory
> userØ
> userØ
> 
> 
> ...
> 
> 
> nexus
> *
> Local Nexus
> http://localhost:8081/repository/maven-public
> 
> 
> ...
> {code}
> The settings.xml file is saved using UTF-8 encoding and it appears that Maven 
> reads the username and passwords correctly into strings, but Apache 
> HttpClient do not encode the UTF-8 characters when encoding them into base64.
> I did a quick patch of Wagon to make it work for my use case, where 
> HttpClient is configured to encode as UTF-8. As is mentioned in MNG-5917, it 
> is not completely clear from the standards how these characters are supposed 
> to be handled, but on my system both wget and the Chrome web browser encode 
> the characters the same way as after my patch and are able to download files 
> from Nexus.
> Since Artifactory was used in MNG-5917, I also tested against that, but in 
> contrast to Maven it was not able to decode the username and password 
> correctly, however it would be broken without the patch anyway.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WAGON-538) Basic authentication fails if the password contains non-ascii characters

2018-11-11 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/WAGON-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16683002#comment-16683002
 ] 

Michael Osipov edited comment on WAGON-538 at 11/11/18 8:41 PM:


That's weird it is still present in 4.5.x in 
{{RFC2617Scheme#getCredentialsCharset(HttpRequest)}}. Did you enable logging 
and check for the base 64 value?
The SO answer is from The Oleg. I am a core committer of HttpClient too, but 
very low activity.

Can you try to set a break point in your IDE on that spot? It should actually 
have been set, if not this may be a bug in Wagon.


was (Author: michael-o):
That's weird it is still present in 4.5.x in 
{{RFC2617Scheme#getCredentialsCharset(HttpRequest)}}. Did you enable logging 
and check for the base 64 value?
The SO answer is from The Oleg. I am a core committer of HttpClient too, but 
very low activity.

Can you try to set a break point in your IDE on that spot. It should actually 
have been set, if not this may be a bug in Wagon.

> Basic authentication fails if the password contains non-ascii characters
> 
>
> Key: WAGON-538
> URL: https://issues.apache.org/jira/browse/WAGON-538
> Project: Maven Wagon
>  Issue Type: Bug
>Reporter: Aleksander Gjermundsen
>Priority: Major
>
> If the username and/or password used to authenticate to Nexus contains 
> non-ascii characters, the authentication fails with an access denied error. 
> After using Wireshark to investigate the headers being sent (in my case "Ø", 
> any non-ascii characters are replaced with "?".
> To test, I have used the following configuration:
> {code:java}
> http://maven.apache.org/SETTINGS/1.0.0;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
> http://maven.apache.org/xsd/settings-1.0.0.xsd;>
> ...
> 
> 
> artifactory
> userØ
> userØ
> 
> 
> ...
> 
> 
> nexus
> *
> Local Nexus
> http://localhost:8081/repository/maven-public
> 
> 
> ...
> {code}
> The settings.xml file is saved using UTF-8 encoding and it appears that Maven 
> reads the username and passwords correctly into strings, but Apache 
> HttpClient do not encode the UTF-8 characters when encoding them into base64.
> I did a quick patch of Wagon to make it work for my use case, where 
> HttpClient is configured to encode as UTF-8. As is mentioned in MNG-5917, it 
> is not completely clear from the standards how these characters are supposed 
> to be handled, but on my system both wget and the Chrome web browser encode 
> the characters the same way as after my patch and are able to download files 
> from Nexus.
> Since Artifactory was used in MNG-5917, I also tested against that, but in 
> contrast to Maven it was not able to decode the username and password 
> correctly, however it would be broken without the patch anyway.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WAGON-538) Basic authentication fails if the password contains non-ascii characters

2018-11-11 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/WAGON-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16682925#comment-16682925
 ] 

Michael Osipov edited comment on WAGON-538 at 11/11/18 4:26 PM:


I have considered the same patch for the linked issue, but discarded it for two 
reasons:

1. It explicitly sets the auth providers, users cannot control it
2. We enforce the encoding though we don't know this is correct or not

More over, something like this has actually to be on a per-server basis, but 
Wagon's design does not allow that. A Maven-wide config is just a bad 
compromise.


was (Author: michael-o):
I have considered the same patch for the linked issue, but discarded it for two 
reasons:

1. It explicitly sets the auth providers, users cannot control it
2. We enforce the encoding though we don't know this is correct or not

> Basic authentication fails if the password contains non-ascii characters
> 
>
> Key: WAGON-538
> URL: https://issues.apache.org/jira/browse/WAGON-538
> Project: Maven Wagon
>  Issue Type: Bug
>Reporter: Aleksander Gjermundsen
>Priority: Major
>
> If the username and/or password used to authenticate to Nexus contains 
> non-ascii characters, the authentication fails with an access denied error. 
> After using Wireshark to investigate the headers being sent (in my case "Ø", 
> any non-ascii characters are replaced with "?".
> To test, I have used the following configuration:
> {code:java}
> http://maven.apache.org/SETTINGS/1.0.0;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
> http://maven.apache.org/xsd/settings-1.0.0.xsd;>
> ...
> 
> 
> artifactory
> userØ
> userØ
> 
> 
> ...
> 
> 
> nexus
> *
> Local Nexus
> http://localhost:8081/repository/maven-public
> 
> 
> ...
> {code}
> The settings.xml file is saved using UTF-8 encoding and it appears that Maven 
> reads the username and passwords correctly into strings, but Apache 
> HttpClient do not encode the UTF-8 characters when encoding them into base64.
> I did a quick patch of Wagon to make it work for my use case, where 
> HttpClient is configured to encode as UTF-8. As is mentioned in MNG-5917, it 
> is not completely clear from the standards how these characters are supposed 
> to be handled, but on my system both wget and the Chrome web browser encode 
> the characters the same way as after my patch and are able to download files 
> from Nexus.
> Since Artifactory was used in MNG-5917, I also tested against that, but in 
> contrast to Maven it was not able to decode the username and password 
> correctly, however it would be broken without the patch anyway.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)