X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=install%2Findex.php;h=654d21cab8575157e309d6e36d1e06ecea4b76f3;hb=refs%2Ftags%2F1.9.1beta2;hp=77e50864015b4bbb7b0092eebd7ae013ab1f073b;hpb=fdda9fd9a356b38aad39a4f3703085ce8afc161b;p=github%2Fwallabag%2Fwallabag.git diff --git a/install/index.php b/install/index.php index 77e50864..654d21ca 100755 --- a/install/index.php +++ b/install/index.php @@ -16,6 +16,29 @@ $email = ""; require_once('install_functions.php'); +// Start by destroying session to avoid wrong logins from previous installations +// cookie part +$cookiedir = ''; +if (dirname($_SERVER['SCRIPT_NAME'])!='/') { + $cookiedir = dirname($_SERVER["SCRIPT_NAME"]).'/'; +} + +if (isset($_SERVER['HTTP_COOKIE'])) { + $cookies = explode(';', $_SERVER['HTTP_COOKIE']); + foreach($cookies as $cookie) { + $parts = explode('=', $cookie); + $name = trim($parts[0]); + setcookie($name, '', time()-1000); + setcookie($name, '', time()-1000, $cookiedir); + } +} +// session part +if (isset($_SESSION['poche_user'])) { + unset($_SESSION['poche_user']); +} +session_destroy(); + + if (isset($_GET['clean'])) { if (is_dir('install')){ delTree('install', true);