Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2692084
D25219.1734755330.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25219.1734755330.diff
View Options
diff --git a/src/applications/auth/factor/PhabricatorAuthFactor.php b/src/applications/auth/factor/PhabricatorAuthFactor.php
--- a/src/applications/auth/factor/PhabricatorAuthFactor.php
+++ b/src/applications/auth/factor/PhabricatorAuthFactor.php
@@ -413,8 +413,8 @@
$sync_type = PhabricatorAuthMFASyncTemporaryTokenType::TOKENTYPE;
$sync_token = null;
- $sync_key = $request->getStr($this->getMFASyncTokenFormKey());
- if (strlen($sync_key)) {
+ $sync_key = $request->getStr($this->getMFASyncTokenFormKey(), '');
+ if ($sync_key !== '') {
$sync_key_digest = PhabricatorHash::digestWithNamedKey(
$sync_key,
PhabricatorAuthMFASyncTemporaryTokenType::DIGEST_KEY);
diff --git a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
@@ -257,7 +257,7 @@
// example, with SMS).
if (!$request->isFormPost() || !$request->getBool('mfa.start')) {
$enroll = $selected_provider->getEnrollMessage();
- if (!strlen($enroll)) {
+ if (!phutil_nonempty_string($enroll)) {
$enroll = $selected_provider->getEnrollDescription($viewer);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 04:28 (17 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1023003
Default Alt Text
D25219.1734755330.diff (1 KB)
Attached To
Mode
D25219: Fix PHP 8.1 "strlen(null)" exceptions which block adding 2FA factor
Attached
Detach File
Event Timeline
Log In to Comment