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

Validation error on short passwords #212

Open
dfyx opened this issue Jul 13, 2015 · 4 comments
Open

Validation error on short passwords #212

dfyx opened this issue Jul 13, 2015 · 4 comments

Comments

@dfyx
Copy link

dfyx commented Jul 13, 2015

I recently had a case where a user had a rather short password (don't ask why. He's been told to change it). When he logged in via devise_ldap_authenticatable, he just got a generic error 500. Digging through the logs revealed that the root cause was a failing validation regarding password length.

I would expect devise_ldap_authenticatable to skip that validation. If the user exists with that password on the ldap server, it should be okay.

@bengsiswantoh
Copy link

try setting config.password_length = range1..range2 in devise config

@dfyx
Copy link
Author

dfyx commented Jul 14, 2015

Yeah, I did that as a workaround but I think devise_ldap_authenticatable should do that by itself.

@littldr
Copy link

littldr commented Jan 19, 2016

Got the same problem. Our Ldap password policy diverge in some cases from our application using devise_ldap_authenticatable. But i would like to enforce a more complex password policy for our application independent of the ldap policy (which is not managed by us).

Maybe devise_ldap_authenticatable should show a meaningful error (e.g. 'Password too short' as flash message) instead of a generic 500 page?

@dfyx
Copy link
Author

dfyx commented Jan 19, 2016

Well, I think the password length should be checked only when creating the account. Currently it throws an error on every login. In my opinion at that point everything that's in the ldap database should be considered correct even if it doesn't match the client's rules for new passwords.

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

No branches or pull requests

3 participants