From: Tim Düsterhus Date: Thu, 26 Nov 2020 11:35:21 +0000 (+0100) Subject: Improve variable naming in update_com.woltlab.wcf_5.4_session_1_cookies.php X-Git-Tag: 5.4.0_Alpha_1~583^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff285493990a1dac4b9e91a3f7bfd28eff353cb9;p=GitHub%2FWoltLab%2FWCF.git Improve variable naming in update_com.woltlab.wcf_5.4_session_1_cookies.php --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_session_1_cookies.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_session_1_cookies.php index 7bd8faf70e..db926ee461 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_session_1_cookies.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_session_1_cookies.php @@ -18,25 +18,25 @@ use wcf\util\CryptoUtil; use wcf\util\HeaderUtil; // 1) Check whether the cookies are already in place. -$sessionIdOkay = false; +$hasValidSessionCookie = false; if (!empty($_COOKIE[COOKIE_PREFIX."acp_session"])) { $cookieValue = CryptoUtil::getValueFromSignedString($_COOKIE[COOKIE_PREFIX."acp_session"]); if ($cookieValue) { $sessionID = \bin2hex($cookieValue); if ($sessionID === WCF::getSession()->sessionID) { - $sessionIdOkay = true; + $hasValidSessionCookie = true; } } } -$xsrfTokenOkay = false; +$hasValidXsrfToken = false; if (!empty($_COOKIE['XSRF-TOKEN'])) { if (CryptoUtil::validateSignedString($_COOKIE['XSRF-TOKEN'])) { - $xsrfTokenOkay = true; + $hasValidXsrfToken = true; } } -if ($sessionIdOkay && $xsrfTokenOkay) { +if ($hasValidSessionCookie && $hasValidXsrfToken) { // The process may continue; return; }