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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3319610-2.patch | 1011 bytes | acbramley |
| #2 | 3319610-2-failing-test.patch | 503 bytes | acbramley |
Comments
Comment #2
acbramley commentedComment #4
dpiWe 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.
Comment #5
dpiNever mind the test uses the submodule 😅
Comment #6
dpiCreated #3319617: Disallow viewing recovery codes after first display per 4
Comment #8
jcnventura