Page MenuHomePhabricator

Review dead code around TOTP scratch tokens
Closed, ResolvedPublic

Description

Follow-up from the token problem found at T244308: PHP Notice: Undefined offset: 8 from TOTPKey.php.

I did a bit of analysis and came up with https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OATHAuth/+/582945.

Please review and/or adjust accordingly so that similar bugs can be avoided in the future, and so that we have a better understanding of what this is meant to do.

Event Timeline

Change 582945 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/extensions/OATHAuth@master] TOTPKey: Use foreach instead of for-i-length and remove dead code

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OATHAuth/ /582945

Krinkle renamed this task from Figure out what the dead code around scratch tokens is meant to do to Review dead code around TOTP scratch tokens.Aug 12 2020, 3:50 AM
Krinkle triaged this task as Medium priority.

Change 582945 merged by jenkins-bot:
[mediawiki/extensions/OATHAuth@master] TOTPKey: Use foreach instead of for-i-length and remove dead code

https://gerrit.wikimedia.org/r/582945

Krinkle assigned this task to Jdforrester-WMF.

Thanks James. Re-tagging PE for future query analysis since afaik this is code PE commissioned (not external or for other teams, it was meant to be internal maintenance).