davideuler / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

Using E-mail address as LDAP username prevents personal repositories from working. #514

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Configure Gitblit against an LDAP server, specifically configuring the 
realm.ldap.uid parameter to an e-mail value.
2.  Log in as any user using the e-mail address and password.
3.  Attempt to create a new repository.  This fails to validate or submit with 
"Illegal character '@' in repository name!"

What is the expected output? What do you see instead?

I would expect that unacceptable characters would be encoded or stripped - or 
at least have the option to use an alternate LDAP attribute for the repository 
name without having to change what users use to log in.
If there is macro syntax for the properties file that would allow me to strip 
out the @ from the user's ID, I could run with that as well.

What version of the product are you using? On what operating system?

GitBlit 1.6.0

$ lsb_release -a
LSB Version:    
:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd6
4:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.5 (Santiago)
Release:        6.5
Codename:       Santiago

Please provide any additional information below.

Original issue reported on code.google.com by chsh...@gmail.com on 8 Oct 2014 at 6:11

GoogleCodeExporter commented 9 years ago
Using the email address as the account name is not a supported/designed use 
which is why it doesn't work correctly.  Unfortunately, I believe there are 
many corner-cases in the code where the extraction/sanitization method you are 
proposing would be a problem.

Why do you want to set account names to addresses?  Is it because your ldap 
auto-generates account names?  Or were you looking to be able to login to 
Gitblit using an email address?  Logging in via the user email address is 
something I would entertain supporting - but you'd still have to setup a valid 
username.

Original comment by James.Mo...@gmail.com on 14 Oct 2014 at 8:06

GoogleCodeExporter commented 9 years ago
Yes, it's so users can log in via e-mail address instead of using generated 
account names.  It would be workable in my case to use e-mail to log in and a 
uid value as the repository name. 

Gitblit otherwise works very well using an e-mail address for the user account, 
it's only private repositories which do not.

Original comment by chsh...@gmail.com on 14 Oct 2014 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by James.Mo...@gmail.com on 24 Oct 2014 at 12:04