Bladeren bron

Send cookie FreshRSS_login only once

Prior to this patch, two cookies with the same name were sent, the first
one was to destroy the cookie, and the second one to create it
Alexandre Alapetite 9 jaren geleden
bovenliggende
commit
0150aec07e
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      app/Models/Auth.php

+ 1 - 1
app/Models/Auth.php

@@ -236,8 +236,8 @@ class FreshRSS_FormAuth {
 
 
 	public static function deleteCookie() {
 	public static function deleteCookie() {
 		$token = Minz_Session::getLongTermCookie('FreshRSS_login');
 		$token = Minz_Session::getLongTermCookie('FreshRSS_login');
-		Minz_Session::deleteLongTermCookie('FreshRSS_login');
 		if (ctype_alnum($token)) {
 		if (ctype_alnum($token)) {
+			Minz_Session::deleteLongTermCookie('FreshRSS_login');
 			@unlink(DATA_PATH . '/tokens/' . $token . '.txt');
 			@unlink(DATA_PATH . '/tokens/' . $token . '.txt');
 		}
 		}