Project

General

Profile

Actions

Patch #44074

open

ignored and unnecessary scope in twofa token lookup

Added by Jens Krämer about 7 hours ago. Updated about 7 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring

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

Actions #1

Updated by Go MAEDA about 7 hours ago

  • Target version set to Candidate for next major release
Actions

Also available in: Atom PDF