-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
ActiveRecord::RecordInvalid: Validation failed: Contact location has already been taken (ActiveRecord::RecordInvalid) #1809
Labels
🐞 bug
Something isn't working
Comments
zspencer
added a commit
that referenced
this issue
Oct 12, 2023
- #1809 There's a couple things happening, one of which is if an `AuthenticationMethod` does not have a One Time Password Secret, it can't actually do the verification. So i've added a check to make sure it returns false in cases when the OTP secret has not been set yet; as well as when a nil OTP is provided.
zspencer
added a commit
that referenced
this issue
Oct 12, 2023
- #1809 OK, so my working assumption is that the bug is caused by two requests being processed at the same time for a new email address, and the first one creates the `AuthenticationMethod` and the second one *tries* to, and fails; resulting in the validation error. This fixes the racecondition at the controller level, but I think we want to do it at in AuthenticatedSession#save instead...
zspencer
added a commit
that referenced
this issue
Oct 12, 2023
- #1809 OK, so my working assumption is that the bug is caused by two requests being processed at the same time for a new email address, and the first one creates the `AuthenticationMethod` and the second one *tries* to, and fails; resulting in the validation error. This requeries the database and retries the rest of the work. Would love to have names for methods to pull this out into, rather than copy-pasting the method body but oh well.
OK, I think I've got this fixed. Once code review comes in I'll merge and mark resolved and move on with my life. |
zspencer
added a commit
that referenced
this issue
Oct 12, 2023
…1891) - #1809 There's a couple things happening, one of which is if an `AuthenticationMethod` does not have a One Time Password Secret, it can't actually do the verification. So i've added a check to make sure it returns false in cases when the OTP secret has not been set yet; as well as when a nil OTP is provided.
zspencer
added a commit
that referenced
this issue
Oct 14, 2023
- #1809 OK, so my working assumption is that the bug is caused by two requests being processed at the same time for a new email address, and the first one creates the `AuthenticationMethod` and the second one *tries* to, and fails; resulting in the validation error. This requeries the database and retries the rest of the work. Would love to have names for methods to pull this out into, rather than copy-pasting the method body but oh well.
zspencer
added a commit
that referenced
this issue
Oct 14, 2023
…#1892) * 🐞🔨`Authentication` Prevent a condition when double-tapping sign-in - #1809 OK, so my working assumption is that the bug is caused by two requests being processed at the same time for a new email address, and the first one creates the `AuthenticationMethod` and the second one *tries* to, and fails; resulting in the validation error. This requeries the database and retries the rest of the work.
OK, it's fixed! Wooo! |
rosschapman
pushed a commit
that referenced
this issue
Oct 23, 2023
- #1809 There's a couple things happening, one of which is if an `AuthenticationMethod` does not have a One Time Password Secret, it can't actually do the verification. So i've added a check to make sure it returns false in cases when the OTP secret has not been set yet; as well as when a nil OTP is provided.
rosschapman
pushed a commit
that referenced
this issue
Oct 23, 2023
…#1892) * 🐞🔨`Authentication` Prevent a condition when double-tapping sign-in - #1809 OK, so my working assumption is that the bug is caused by two requests being processed at the same time for a new email address, and the first one creates the `AuthenticationMethod` and the second one *tries* to, and fails; resulting in the validation error. This requeries the database and retries the rest of the work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Space
:Authentication
#118Sentry Issue: CONVENE-1Y
The text was updated successfully, but these errors were encountered: