Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2656482
D25375.1732639061.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
D25375.1732639061.diff
View Options
diff --git a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
--- a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
+++ b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php
@@ -67,7 +67,7 @@
}
$denied = $request->getStr('denied');
- if (strlen($denied)) {
+ if ($denied) {
// Twitter indicates that the user cancelled the login attempt by
// returning "denied" as a parameter.
throw new PhutilAuthUserAbortedException();
diff --git a/src/applications/auth/view/PhabricatorAuthAccountView.php b/src/applications/auth/view/PhabricatorAuthAccountView.php
--- a/src/applications/auth/view/PhabricatorAuthAccountView.php
+++ b/src/applications/auth/view/PhabricatorAuthAccountView.php
@@ -29,13 +29,14 @@
$realname = $account->getRealName();
$use_name = null;
- if (strlen($dispname)) {
+ if (phutil_nonempty_string($dispname)) {
$use_name = $dispname;
- } else if (strlen($username) && strlen($realname)) {
+ } else if (phutil_nonempty_string($username) &&
+ phutil_nonempty_string($realname)) {
$use_name = $username.' ('.$realname.')';
- } else if (strlen($username)) {
+ } else if (phutil_nonempty_string($username)) {
$use_name = $username;
- } else if (strlen($realname)) {
+ } else if (phutil_nonempty_string($realname)) {
$use_name = $realname;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 16:37 (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
997742
Default Alt Text
D25375.1732639061.diff (1 KB)
Attached To
Mode
D25375: Fix PHP 8.1 "strlen(null)" exceptions blocking account registration with custom OAuth provider after redirect
Attached
Detach File
Event Timeline
Log In to Comment