-
Notifications
You must be signed in to change notification settings - Fork 658
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
Added strict validation for username and password in backend. #4670
base: master
Are you sure you want to change the base?
Added strict validation for username and password in backend. #4670
Conversation
Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
bef75aa
to
edaa0cf
Compare
Signed-off-by: aryan <aryan1bhokare@gmail.com>
edaa0cf
to
3d2c6c1
Compare
Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
2b85b38
to
2e5b970
Compare
@aryan-bhokare, can you please add an ENV to enable/disable the strict password validation. This ENV (ENABLE_STRICT_PASSWORD_POLICY) will be true by default, i.e. strict password policy check will be implemented, but user can toggle that off based on the use case. |
@@ -23,10 +23,15 @@ func ValidateStrictPassword(input string) error { | |||
if len(input) < 8 { | |||
return fmt.Errorf("password is less than 8 characters") | |||
} | |||
|
|||
if len(input) > 16 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upper limit check may not be required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why that would not be required @SarthakJain26 ?
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io> Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Co-authored-by: Vedant Shrotria <vedant.shrotria@harness.io> Signed-off-by: Aryan Bhokare <92683836+aryan-bhokare@users.noreply.github.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
Proposed changes
Added validation for username and password in backend.
Following #4650
Types of changes
What types of changes does your code introduce to Litmus? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Dependency
Special notes for your reviewer: