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 double-generation of scratch token (#6832) #6833

Merged
merged 1 commit into from May 2, 2019

Conversation

@SagePtr
Copy link
Contributor

commented May 2, 2019

Removed scratch token regeneration in NewTwoFactor, as it's generated anyway before calling this function.

This fixes bug (#6832) when scratch token was generated twice during 2FA setup and first-generated scratch token was not working (due to instantly being overwritten).

@GiteaBot GiteaBot added the lgtm/need 1 label May 2, 2019

@techknowlogick techknowlogick added this to the 1.9.0 milestone May 2, 2019

SagePtr added a commit to SagePtr/gitea that referenced this pull request May 2, 2019

@codecov-io

This comment has been minimized.

Copy link

commented May 2, 2019

Codecov Report

Merging #6833 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6833      +/-   ##
==========================================
+ Coverage   41.22%   41.22%   +<.01%     
==========================================
  Files         421      421              
  Lines       58124    58120       -4     
==========================================
- Hits        23960    23959       -1     
+ Misses      30992    30988       -4     
- Partials     3172     3173       +1
Impacted Files Coverage Δ
models/twofactor.go 5.31% <0%> (+0.21%) ⬆️
modules/log/event.go 64.46% <0%> (-1.53%) ⬇️
models/unit.go 67.56% <0%> (+5.4%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ade88a8...eb848e9. Read the comment docs.

@lafriks

lafriks approved these changes May 2, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels May 2, 2019

@lafriks lafriks merged commit 59f879b into go-gitea:master May 2, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details

@SagePtr SagePtr deleted the SagePtr:issue6832 branch May 2, 2019

@lafriks

This comment has been minimized.

Copy link
Member

commented May 2, 2019

Please send backport to release/v1.8 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.