HomePhabricator

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, 6:32 PM
epriestleyPushed on Nov 3 2020, 7:04 PM
Differential Revision
D21487: Guarantee terms in PhabricatorAuthPasswordEngine are strings
Parents
rPc04147328fa3: Fix isValidGitShallowCloneResponse
Branches
Unknown
Tags
Unknown
Tasks
T2312: Modifying PHP
Build Status
Buildable 24958
Build 34435: Run Core Tests