Hi, Julian, sorry for not being precise.
RfC 7617 says that the encoding is unspecified. I know. What I meant is that UTF-8 is (sort of) standard for the repo servers. They are mostly written in Java and the standard encoding for Java is UTF-8 in Basic Authentication. FWIW, our repo server (which is Artifactory) expects UTF-8. Regards, Frank > Hello, everybody, > > I have a problem with passwords for the server. I found the reason why > this happens but I am unable to find the correct setting. > > Here is the description: > > We want to publish some artifacts to a repository, so we set up a > settings.xml file which looks like this > > <servers> > <server> > <id>some-repo</id> > <username>testuser</username> > <password>{U8jAeLVPH88HRYGnDpbAmAXPtUPSqbrtxxuZoR513V4=}</password> > </server> > </servers> > > <profile> > <id>some-repo</id> > <repositories> > <repository> > <id>some repo</id> > <name>Some repository</name> > <url>https://our.url.com/artifactory/list/some-repo/</url> > </repository> > </repositories> > </profile> > > When I run a mvn deploy:deploy-file command this works fine, except when the > user testuser has a password that contains non-ASCII characters. In that case > the non-ASCII characters in the password are replaced by the maven client > with question marks when maven authenticates to the repo server. > > I searched the internet up and down and since I could not find a fix I traced > this down to the following code in Maven: > > The class > org.apache.maven.wagon.providers.http.httpclient.impl.auth.RFC2617Scheme has > two methods which look like this: > > public Charset getCredentialsCharset() { > return credentialsCharset != null ? credentialsCharset : > Consts.ASCII; > } > > String getCredentialsCharset(final HttpRequest request) { > String charset = (String) > request.getParams().getParameter(AuthPNames.CREDENTIAL_CHARSET); > if (charset == null) { > charset = getCredentialsCharset().name(); > } > return charset; > } > > The call > request.getParams().getParameter(AuthPNames.CREDENTIAL_CHARSET)returns null > so the default character set is used which is US-ASCII. So the password is > converted to US-ASCII and all non-ASCII characters are replaced by a "?". > > However, the character encoding should be UTF-8. The repo server expects > UTF-8. This is standard with http servers. I tried to figure out if this > maven client phenomenon is a bug or a feature but I could not resolve this. > ... FWIW, this is not "standard". It should be, but isn't. Best regards, Julian (as author of the Basic Auth RFC) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org ________________________________ Pflichtangaben anzeigen<http://www.deutschebahn.com/pflichtangaben/20210430> Nähere Informationen zur Datenverarbeitung im DB-Konzern finden Sie hier: http://www.deutschebahn.com/de/konzern/datenschutz --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org