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

fix: magiclink failing due to passwordStrength check #1769

Merged
merged 10 commits into from
Sep 24, 2024

Conversation

klajdi369
Copy link
Contributor

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

#1761

What is the new behavior?

Now the password should generate secure enough with the necessary password requirements specified in environment variables.

Additional context

Basically this line in /internal/api/magic_link.go
password.Generate(64, 10, 1, false, true)
Generates an invalid value for this line in /internal/api/signup.go
if err := a.checkPasswordStrength(ctx, p.Password); err != nil {

@klajdi369 klajdi369 requested a review from a team as a code owner September 6, 2024 20:47
@klajdi369 klajdi369 changed the title Fix-magiclink-requiredchars fix: magiclink failing due to passwordStrength check Sep 9, 2024
@klajdi369 klajdi369 force-pushed the fix-magiclink-requiredchars branch from deb465d to 07a44bc Compare September 10, 2024 20:14
@klajdi369 klajdi369 marked this pull request as draft September 10, 2024 20:18
@klajdi369 klajdi369 force-pushed the fix-magiclink-requiredchars branch from 999c09e to fb1a58c Compare September 10, 2024 20:42
@klajdi369 klajdi369 marked this pull request as ready for review September 10, 2024 20:50
@coveralls
Copy link

coveralls commented Sep 16, 2024

Pull Request Test Coverage Report for Build 11013705366

Details

  • 30 of 38 (78.95%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 57.79%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/crypto/crypto.go 4 6 66.67%
internal/crypto/password.go 25 31 80.65%
Totals Coverage Status
Change from base Build 11009059564: 0.05%
Covered Lines: 9243
Relevant Lines: 15994

💛 - Coveralls

internal/utilities/password.go Outdated Show resolved Hide resolved
internal/utilities/password.go Outdated Show resolved Hide resolved
internal/utilities/password.go Outdated Show resolved Hide resolved
internal/utilities/password.go Outdated Show resolved Hide resolved
@hf
Copy link
Contributor

hf commented Sep 24, 2024

@klajdi369 Want to address the comments so we merge this?

@klajdi369
Copy link
Contributor Author

@klajdi369 Want to address the comments so we merge this?

Hi, yes, most likely will do within this week, as I have not had the time to get back to this PR.

klajdi369 and others added 2 commits September 24, 2024 10:50
Co-authored-by: Chris Stockton <180184+cstockton@users.noreply.github.com>
@klajdi369 klajdi369 force-pushed the fix-magiclink-requiredchars branch from 3bc0724 to d2fe8f9 Compare September 24, 2024 10:15
Copy link
Contributor

@cstockton cstockton left a comment

Choose a reason for hiding this comment

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

Thanks a lot for updating this and I really appreciate you adding a test, great work!

@cstockton cstockton merged commit 7a5411f into supabase:master Sep 24, 2024
1 check passed
kangmingtay pushed a commit that referenced this pull request Sep 27, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.162.0](v2.161.0...v2.162.0)
(2024-09-27)


### Features

* add support for migration of firebase scrypt passwords
([#1768](#1768))
([ba00f75](ba00f75))


### Bug Fixes

* apply authorized email restriction to non-admin routes
([#1778](#1778))
([1af203f](1af203f))
* magiclink failing due to passwordStrength check
([#1769](#1769))
([7a5411f](7a5411f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

4 participants