HomePhorge

Guarantee terms in PhabricatorAuthPasswordEngine are strings

Description

Guarantee terms in PhabricatorAuthPasswordEngine are strings

Summary:
Ref T2312. Numeric strings are read out of arrays as integers, and modern PHP raises appropriate warnings when they're then treated as strings.

For now, cast the keys to strings explicitly (we know we inserted only strings). In the future, introduction of a StringMap type or similar might be appropriate.

Test Plan:

  • Added "abc.12345.xyz" to the blocklist, changed my VCS password.
  • Before: fatal when trying to "strpos()" an integer.
  • After: password change worked correctly.

Maniphest Tasks: T2312

Differential Revision: https://secure.phabricator.com/D21487

Details

Provenance
epriestleyAuthored on Nov 3 2020, 10:32 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPc04147328fa3: Fix isValidGitShallowCloneResponse
Branches
Unknown
Tags
Unknown

Event Timeline