Skip to content

Commit

Permalink
cyklokoalicia#136 Fix incorrect redirect type
Browse files Browse the repository at this point in the history
  • Loading branch information
pato1 committed Jun 12, 2019
1 parent d93f10d commit 3aefd53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions actions-web.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,15 +547,17 @@ function login($number,$password)
$db->conn->commit();
setcookie("loguserid",$userId,time()+86400*14);
setcookie("logsession",$sessionId,time()+86400*14);
header("HTTP/1.1 301 Moved permanently");
header("HTTP/1.1 302 Found");
header("Location: ".$systemURL);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header("Connection: close");
exit;
}
else
{
header("HTTP/1.1 301 Moved permanently");
header("HTTP/1.1 302 Found");
header("Location: ".$systemURL."?error=1");
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header("Connection: close");
exit;
}
Expand All @@ -572,8 +574,9 @@ function logout()
$result=$db->query("DELETE FROM sessions WHERE userId='$userid'");
$db->conn->commit();
}
header("HTTP/1.1 301 Moved permanently");
header("HTTP/1.1 302 Found");
header("Location: ".$systemURL);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header("Connection: close");
exit;
}
Expand Down
6 changes: 4 additions & 2 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,18 @@ function checksession()
$db->conn->commit();
setcookie("loguserid","",time()-86400);
setcookie("logsession","",time()-86400);
header("HTTP/1.1 301 Moved permanently");
header("HTTP/1.1 302 Found");
header("Location: ".$systemURL."?error=2");
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header("Connection: close");
exit;
}
}
else
{
header("HTTP/1.1 301 Moved permanently");
header("HTTP/1.1 302 Found");
header("Location: ".$systemURL."?error=2");
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header("Connection: close");
exit;
}
Expand Down

0 comments on commit 3aefd53

Please sign in to comment.