Fix some issues with secure cookies being overwritten by insecure site.
Now, /publish/{edit,addeditor,login,logout} must be accessed via
https://; other pages should not be (but can be).
This commit is contained in:
+4
-1
@@ -1,7 +1,11 @@
|
||||
<?
|
||||
if ( ! isset($_SERVER['HTTPS'])) {
|
||||
header('Location: https://' . $_SERVER["SERVER_NAME"] . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
require_once("../session.lib.php");
|
||||
if (!isset($_SESSION['editor'])) {
|
||||
$is_admin = FALSE;
|
||||
session_write_close();
|
||||
header("Location: https://xxx.org.za/publish/login");
|
||||
return;
|
||||
}
|
||||
@@ -28,7 +32,6 @@ if (!isset($_SESSION['editor'])) {
|
||||
$editable = TRUE;
|
||||
$id = get_id();
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
<div id='container'>
|
||||
|
||||
Reference in New Issue
Block a user