Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support dynamic password lengths for Rails > 5.2 #5166
Conversation
|
Hello, @manojmj92! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information. |
032f163
to
ca66541
|
SourceLevel has finished reviewing this Pull Request and has found:
|
dcfc2c3
to
3fd43fc
|
Hello @tegon, could you kindly review? |
|
@carlosantoniodasilva could you please review? |
|
@manojmj92 sorry about the delay here, things have been a bit crazy but this is on my radar to get back to you. Thanks for the work. |
3fd43fc
to
188fe6c
|
Hello @carlosantoniodasilva, could you please review? |
|
@manojmj92 yes, my apologies, this one slipped through the cracks, appreciate the ping. I've recently started to catch up on some of the issues/PRs here and this one is high on my radar, I'll get to it soon, just have a few other things to wrap up first. |
Hello,
Rails now supports length validator to have dynamic min and max values.
I feel this would be a nice addition to have Devise support this feature. I have made the change such that no current installations of Devise will have trouble with this change. Everything should work as perfectly as before.
This change is useful for instances where applications have the need to support dynamic password lengths, without a system restart. Such applications will just have to override the
password_lengthmethod in their own classes to support dynamic password lengths.Real world use case: We have been trying to implement dynamic password length at GitLab. Implementation issue: https://gitlab.com/gitlab-org/gitlab/issues/36776
Right now, we have implemented the same using a monkey patch for the password length validator