Page MenuHomePhabricator

Guarantee terms in PhabricatorAuthPasswordEngine are strings
ClosedPublic

Authored by epriestley on Nov 3 2020, 6:37 PM.
Tags
None
Referenced Files
F19276901: D21487.diff
Tue, Dec 23, 1:25 AM
F18855258: D21487.id51144.diff
Nov 1 2025, 4:36 AM
F18841198: D21487.diff
Oct 28 2025, 7:36 AM
F18827248: D21487.id51143.diff
Oct 24 2025, 8:43 AM
F18811425: D21487.id.diff
Oct 20 2025, 3:21 AM
F18807653: D21487.id51142.diff
Oct 19 2025, 2:43 AM
F18807583: D21487.id51144.diff
Oct 19 2025, 2:26 AM
F18790983: D21487.id51142.diff
Oct 15 2025, 10:03 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Nov 3 2020, 7:04 PM
This revision was automatically updated to reflect the committed changes.