Project

General

Profile

Actions

Patch #44368

closed

Revert removal of user scope in 2FA backup code lookup

Added by Jens Krämer about 15 hours ago. Updated about 5 hours ago.

Status:
Closed
Priority:
Normal
Category:
Accounts / authentication
Target version:

Description

As it turns out, the where(user_id:) scope prepended to Token.find_token that was removed in #44074
was actually honored and served to prevent a user from removing another users' backup code in the
(very unlikely) case that they somehow managed to enter another users backup code.

This patch reverts that change and adds test that confirm effectiveness of the user-id scoping.


Files


Related issues

Related to Redmine - Patch #44074: ignored and unnecessary scope in twofa token lookupClosedMarius BĂLTEANUActions
Actions

Also available in: Atom PDF