]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Session cookie setting being set while session is active (#1406)
authorArthurHoaro <arthur@hoa.ro>
Sun, 26 Jan 2020 08:12:44 +0000 (09:12 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Jan 2020 08:12:44 +0000 (09:12 +0100)
Session cookie setting being set while session is active

index.php

index a39fc762e23aaa0c9a7212e049adc7ef4c0c91eb..6a82d571a6a22e7e9c5f84c0f193cbcd08d569a2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -243,7 +243,9 @@ if (isset($_POST['login'])) {
         }
 
         // Send cookie with the new expiration date to the browser
+        session_destroy();
         session_set_cookie_params($expirationTime, $cookiedir, $_SERVER['SERVER_NAME']);
+        session_start();
         session_regenerate_id(true);
 
         // Optional redirect after login: