Project

General

Profile

Actions

Patch #44074

closed

ignored and unnecessary scope in twofa token lookup

Added by Jens Krämer 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Code cleanup/refactoring
Target version:

Description

When deleting the used twofa backup code there is this line:

Token.where(user_id: @user.id).find_token('twofa_backup_code', code).try(:delete)

Token.find_token however doesn't honor the prepended relation, and also we do check the user
in the next line so the patch simply removes the where(...) part.


Files


Related issues

Related to Redmine - Patch #44368: Revert removal of user scope in 2FA backup code lookupClosedMarius BĂLTEANUActions
Actions #1

Updated by Go MAEDA 3 months ago

  • Target version set to Candidate for next major release
Actions #2

Updated by Marius BĂLTEANU 3 months ago

  • Status changed from New to Closed
  • Assignee set to Marius BĂLTEANU
  • Target version changed from Candidate for next major release to 7.0.0

Committed, thanks!

Actions #3

Updated by Go MAEDA 8 days ago

  • Related to Patch #44368: Revert removal of user scope in 2FA backup code lookup added
Actions

Also available in: Atom PDF