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

feat: Added reset password as a mandatory step if new user logs in #4729

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

hrishavjha
Copy link
Member

@hrishavjha hrishavjha commented Jun 25, 2024

Proposed changes

Added ResetPassword as a required step for new users so manage weak password issues after admin creates an user.

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 the 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:

Comment on lines +174 to +176
findOneErr := r.Collection.FindOne(context.TODO(), bson.M{
"username": result.Username,
}).Decode(&result)

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query depends on a
user-provided value
.
This query depends on a
user-provided value
.
@@ -188,11 +196,13 @@
}}
}

_, err = r.Collection.UpdateOne(context.Background(), bson.M{"username": result.ID}, updateQuery)
res, err := r.Collection.UpdateOne(context.Background(), bson.M{"username": result.Username}, updateQuery)

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query depends on a
user-provided value
.
This query depends on a
user-provided value
.
@hrishavjha hrishavjha force-pushed the master branch 2 times, most recently from 42a8b53 to 5d84630 Compare June 25, 2024 14:41
Signed-off-by: Hrishav <hrishav.kumar@harness.io>
Signed-off-by: Hrishav <hrishav.kumar@harness.io>
@Saranya-jena Saranya-jena merged commit 16ea8cb into litmuschaos:master Jun 26, 2024
17 of 19 checks passed
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

3 participants