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

Added strict validation for username and password in backend. #4670

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

aryan-bhokare
Copy link
Contributor

@aryan-bhokare aryan-bhokare commented May 23, 2024

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 apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

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.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from bef75aa to edaa0cf Compare May 23, 2024 13:08
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from edaa0cf to 3d2c6c1 Compare May 23, 2024 13:10
Signed-off-by: aryan <aryan1bhokare@gmail.com>
Signed-off-by: aryan <aryan1bhokare@gmail.com>
@aryan-bhokare aryan-bhokare force-pushed the backend-validation-username-password branch from 2b85b38 to 2e5b970 Compare May 24, 2024 09:54
@SarthakJain26
Copy link
Contributor

@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 {
Copy link
Contributor

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

Copy link
Contributor Author

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 ?

aryan-bhokare and others added 4 commits June 19, 2024 18:26
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>
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

Successfully merging this pull request may close these issues.

None yet

6 participants