]> git.mxchange.org Git - friendica.git/commitdiff
Remove uneeded variable.
authordew-git <55564947+dew-git@users.noreply.github.com>
Fri, 11 Oct 2019 04:48:13 +0000 (20:48 -0800)
committerdew-git <55564947+dew-git@users.noreply.github.com>
Fri, 11 Oct 2019 04:48:13 +0000 (20:48 -0800)
src/Module/Login.php

index a8c9f9fb92ae1806ef9404f60971d1a59e80b4dc..8affd77557a3e9fe557024801be30330ee798d91 100644 (file)
@@ -190,13 +190,10 @@ class Login extends BaseModule
                                        ]
                                );
                                if (DBA::isResult($user)) {
-                                       // Time safe comparision of the two hashes.
-                                       $validSession = hash_equals(
+                                       if (!hash_equals(
                                                Authentication::getCookieHashForUser($user),
                                                $data->hash
-                                       );
-
-                                       if (!$validSession) {
+                                       )) {
                                                Logger::log("Hash for user " . $data->uid . " doesn't fit.");
                                                Authentication::deleteSession();
                                                $a->internalRedirect();