Page MenuHomePhorge

D25217.1737382050.diff
No OneTemporary

D25217.1737382050.diff

diff --git a/src/applications/auth/constants/PhabricatorCookies.php b/src/applications/auth/constants/PhabricatorCookies.php
--- a/src/applications/auth/constants/PhabricatorCookies.php
+++ b/src/applications/auth/constants/PhabricatorCookies.php
@@ -89,7 +89,7 @@
// temporary and clearing it when users log out.
$value = $request->getCookie(self::COOKIE_CLIENTID);
- if (!strlen($value)) {
+ if (!phutil_nonempty_string($value)) {
$request->setTemporaryCookie(
self::COOKIE_CLIENTID,
Filesystem::readRandomCharacters(16));
diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php
--- a/src/applications/auth/controller/PhabricatorAuthController.php
+++ b/src/applications/auth/controller/PhabricatorAuthController.php
@@ -282,7 +282,7 @@
$viewer,
PhabricatorAuthLoginMessageType::MESSAGEKEY);
- if (!strlen($text)) {
+ if (!phutil_nonempty_string($text)) {
return null;
}
diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php
--- a/src/applications/auth/controller/PhabricatorAuthStartController.php
+++ b/src/applications/auth/controller/PhabricatorAuthStartController.php
@@ -98,7 +98,7 @@
}
$next_uri = $request->getStr('next');
- if (!strlen($next_uri)) {
+ if (!phutil_nonempty_string($next_uri)) {
if ($this->getDelegatingController()) {
// Only set a next URI from the request path if this controller was
// delegated to, which happens when a user tries to view a page which
@@ -112,7 +112,7 @@
}
if (!$request->isFormPost()) {
- if (strlen($next_uri)) {
+ if (phutil_nonempty_string($next_uri)) {
PhabricatorCookies::setNextURICookie($request, $next_uri);
}
PhabricatorCookies::setClientIDCookie($request);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 14:07 (1 w, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1135570
Default Alt Text
D25217.1737382050.diff (1 KB)

Event Timeline