1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00
phorge-phorge/src/applications/settings
Andre Klapper d95200da91 Fix PHP 8.1 "strlen(null)" exceptions which block adding 2FA factor
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

Closes T15388

Test Plan:
Applied these two changes; afterwards managed to add a 2FA factor and `/settings/user/username/page/multifactor/?id=1` correctly listed mys Authentication Factors.

Additional tests:

- Unset any eventual personal MFA
- Setup a personal MFA
- Login/Logout using the MFA
- Remove a personal MFA
- Setup a personal enroll message from /auth/mfa/1/
- Setup a personal MFA
- Login/Logout using the MFA
- (then cleanup removing your test MFA)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15388

Differential Revision: https://we.phorge.it/D25219
2023-05-23 11:53:31 +02:00
..
action Simplify implementation of "SysetemAction->getSystemActionConstant()" 2019-07-19 15:45:37 -07:00
application Replace old hard-coded URI-based "changes saved" jank with new overgeneralized cookie-based "changes saved" jank 2020-04-19 09:04:31 -07:00
controller Render timezone names more readably, with spaces rather than underscores ("America/Los Angeles", not "America/Los_Angeles"). 2019-05-30 15:03:11 -07:00
editor Add static errors, supported protocols, and a dynamic function listing to external editor settings page 2020-04-19 09:37:31 -07:00
panel Fix PHP 8.1 "strlen(null)" exceptions which block adding 2FA factor 2023-05-23 11:53:31 +02:00
panelgroup Expand "Settings" UI to full-width 2019-01-23 13:40:34 -08:00
phid Make Settings modular and allow them to be EditEngine'd 2016-05-31 15:32:02 -07:00
query Fix spelling 2017-10-09 10:48:04 -07:00
setting Remove product literal strings in "pht()", part 24 2022-04-25 16:46:26 -07:00
storage Correct overbroad automatic capability grant of global settings objects 2022-05-09 15:10:50 -07:00