-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Display error if twofaSecret cannot be retrieved #14372
Display error if twofaSecret cannot be retrieved #14372
Conversation
I'm confused as to why this is happening in the first place - perhaps there's some race? |
Ah I wonder if this is a double click/double post scenario? |
Codecov Report
@@ Coverage Diff @@
## master #14372 +/- ##
==========================================
+ Coverage 41.84% 41.85% +0.01%
==========================================
Files 744 744
Lines 79741 79746 +5
==========================================
+ Hits 33364 33379 +15
+ Misses 40863 40858 -5
+ Partials 5514 5509 -5
Continue to review full report at Codecov.
|
@zeripath As mentioned over at #14144 (comment), I believe it's the Malwarebytes Firefox addon that's removing the value / messing with it so it's not technically a gitea issue, but at least with this PR we nicely guard against the 500. |
* master: (27 commits) Use path not filepath in routers/editor (go-gitea#14390) Display error if twofaSecret cannot be retrieved (go-gitea#14372) Check if label template exist first (go-gitea#14384) Allow passcode invalid error to appear (go-gitea#14371) exclude authored PRs from Review Requested filter (go-gitea#14368) Upgrade blevesearch dependency to v2.0.1 (go-gitea#14346) Implement ghost comment mitigation (go-gitea#14349) Add edit, delete and reaction support to code review comments on issue page (go-gitea#14339) Add review requested filter on pull request overview (go-gitea#13701) escape branch names in compare url (go-gitea#14364) label and milestone webhooks on issue/pull creation (go-gitea#14363) Fix middlewares sequences (go-gitea#14354) Sort issue search results by revelance (go-gitea#14353) KanBan: be able to set default board (go-gitea#14147) ...
This PR fixes an issue discussed at #14144 where the
twofaSecret
cannot be retrieved from the session. Here we capture this scenario, display the error messageFailed to get secret.
and handle it gracefully instead of returning a 500: