Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP password authentication fails when SVN password is 52 chars or longer #242

Closed
loafoe opened this issue May 5, 2019 · 4 comments · Fixed by #243
Closed

LDAP password authentication fails when SVN password is 52 chars or longer #242

loafoe opened this issue May 5, 2019 · 4 comments · Fixed by #243
Labels

Comments

@loafoe
Copy link

loafoe commented May 5, 2019

I've set git-as-svn with LDAP authentication to a glauth server. When the password is 52 chars or longer git-as-svn throws an exception:

gitassvn_1  | 2019-05-05T15:28:29,297  INFO [SvnServer-thread-27] (SvnServer.java:181) - New connection from: /172.28.0.1:37226
gitassvn_1  | 2019-05-05T15:28:33,134  INFO [SvnServer-thread-27] (SvnServer.java:192) - Connection from /172.28.0.1:37226 closed
gitassvn_1  | Exception in thread "SvnServer-thread-27" java.lang.IllegalArgumentException: Illegal base64 character a
gitassvn_1  | 	at java.util.Base64$Decoder.decode0(Base64.java:714)
gitassvn_1  | 	at java.util.Base64$Decoder.decode(Base64.java:526)
gitassvn_1  | 	at java.util.Base64$Decoder.decode(Base64.java:549)
gitassvn_1  | 	at svnserver.auth.PlainAuthenticator.authenticate(PlainAuthenticator.java:40)
gitassvn_1  | 	at svnserver.server.SvnServer.authenticate(SvnServer.java:341)
gitassvn_1  | 	at svnserver.server.SessionContext.authenticate(SessionContext.java:111)
gitassvn_1  | 	at svnserver.server.SvnServer.serveClient(SvnServer.java:209)
gitassvn_1  | 	at svnserver.server.SvnServer.lambda$run$1(SvnServer.java:185)
gitassvn_1  | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
gitassvn_1  | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
gitassvn_1  | 	at java.lang.Thread.run(Thread.java:748)

When the password is 51 chars everything works as expected and I get the plain password on my LDAP server bind request so I can verify.

Subversion client used:

svn, version 1.10.0 (r1827917)
   compiled Sep 25 2018, 18:25:22 on x86_64-apple-darwin17.0.0

Quite bizarre!

@loafoe
Copy link
Author

loafoe commented May 5, 2019

Tested with version 1.10.0 and 1.9.0

@loafoe
Copy link
Author

loafoe commented May 6, 2019

May be related to #156 ?

slonopotamus added a commit to slonopotamus/git-as-svn that referenced this issue May 6, 2019
Turns out, not all Base64 was born equal. RFC-4648 that we used,
only allows strict Base64 alphabet in input string while RFC-2045 also
allows whitespace, newlines and other funny stuff. And native Subversion
sends \n for long logins/passwords

Fixes git-as-svn#242
slonopotamus added a commit to slonopotamus/git-as-svn that referenced this issue May 6, 2019
Turns out, not all Base64 was born equal. RFC-4648 that we used,
only allows strict Base64 alphabet in input string while RFC-2045 also
allows whitespace, newlines and other funny stuff. And native Subversion
sends \n for long logins/passwords

Fixes git-as-svn#242
@slonopotamus
Copy link
Collaborator

This bug was fixed in git-as-svn 1.10.1 that was just released: https://github.com/bozaro/git-as-svn/releases/tag/1.10.1

@loafoe
Copy link
Author

loafoe commented May 6, 2019

@slonopotamus awesome, thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants