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

Increase password requirements #3454

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Increase password requirements #3454

merged 1 commit into from
Dec 16, 2024

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Dec 13, 2024

Description

Fixes https://linear.app/danswer/issue/DAN-1184/login-bruteforce

How Has This Been Tested?

  • Log in with weak password
  • Upgrade to these stricter password requirements
  • Verify can still log in with weak password
  • Try to create an account with same weak password
  • See error for various new password requirements

Accepted Risk (provide if relevant)

N/A

Related Issue(s) (provide if relevant)

N/A

Mental Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 0:33am

Copy link
Contributor

@rkuo-danswer rkuo-danswer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as stated. Checks need addressing.

)
if not any(char in "!@#$%^&*()_+-=[]{}|;:,.<>?" for char in password):
raise exceptions.InvalidPasswordException(
reason="Password must contain at least one special character (!@#$%^&*()_+-=[]{}|;:,.<>?)."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Special characters feels like the kind of thing we should declare as a constant somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally agree!

@pablonyx pablonyx force-pushed the prevent_login_bruteforce branch from 1557c7d to 334bc6b Compare December 16, 2024 00:28
@pablonyx pablonyx enabled auto-merge December 16, 2024 00:29
@pablonyx pablonyx disabled auto-merge December 16, 2024 00:29
@pablonyx pablonyx merged commit 9032b05 into main Dec 16, 2024
6 of 9 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.

2 participants