Problem/Motivation

Similar to #3318453: Access to TFA page is denied depending on entity/database internals we have a uid comparison for showing recovery codes that fails if uid is an integer.

https://git.drupalcode.org/project/tfa/-/blob/2.x/src/Plugin/Tfa/TfaReco...

Steps to reproduce

Use a database backend which returns true ints.

Or, create a bundle class with id(): int method override

Or, create a bundle class with id(): int method override

Proposed resolution

Coerce left side to an int.

Remaining tasks

Implement

User interface changes

Nil

API changes

Nil

Data model changes

Nil

CommentFileSizeAuthor
#2 3319610-2.patch1011 bytesacbramley
#2 3319610-2-failing-test.patch503 bytesacbramley

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review
StatusFileSize
new503 bytes
new1011 bytes

The last submitted patch, 2: 3319610-2-failing-test.patch, failed testing. View results

dpi’s picture

Issue tags: +Needs tests

We should add extra test coverage. A bundle class test module was added from another issue.

Ideally codes are not readable after generation, I cant think of other systems which allow this; will need to look into new or existing issue.

dpi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Never mind the test uses the submodule 😅

dpi’s picture

  • dad56a3 committed on 2.x
    Issue #3319610 by acbramley, jcnventura: Access to recovery codes is...
jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.