critical fix ensuring Auth can be used outside of Auth directory

This commit is contained in:
vincent 2025-04-14 19:29:36 +02:00
parent d9f5705fd2
commit a50a385c4e
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@
*/ */
if (!include('auth.php')){ if (!include('auth.php')){
header("Location: login.html"); header("Location: /smzint/Auth/login.html");
echo "401 Sie müssen sich <a href='login.html'>anmelden</a>."; echo "401 Sie müssen sich <a href='login.html'>anmelden</a>.";
} }

View file

@ -56,7 +56,7 @@ function createSession($uid){
if ($conn->query($sql) === TRUE) { if ($conn->query($sql) === TRUE) {
// echo "New record created successfully"; // echo "New record created successfully";
setcookie("SMZ-Auth", $sessionID, $expiry); setcookie("SMZ-Auth", $sessionID, $expiry, "/");
} else { } else {
echo "Error: " . $sql . "<br>" . $conn->error; echo "Error: " . $sql . "<br>" . $conn->error;
} }