Take the site address from SITE_URL.
The feed links, the notification email, the webmaster address and the cookie domain now use it.
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ $is_admin = FALSE;
|
||||
|
||||
if (isset($_SERVER['HTTPS'])) {
|
||||
session_cache_limiter('private');
|
||||
session_set_cookie_params(array('lifetime' => 0, 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
session_set_cookie_params(array('lifetime' => 0, 'path' => '/', 'domain' => cookie_domain(), 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
session_start();
|
||||
|
||||
if (isset($_SESSION['editor'])) {
|
||||
@@ -83,7 +83,7 @@ function create_persistent_login($username) {
|
||||
open_db('close');
|
||||
|
||||
// Create cookie with key
|
||||
setcookie('PersistentAuth', "$username|$key", array('expires' => $validity, 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
setcookie('PersistentAuth', "$username|$key", array('expires' => $validity, 'path' => '/', 'domain' => cookie_domain(), 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ function delete_persistent_login() {
|
||||
open_db('close');
|
||||
|
||||
// Delete cookie
|
||||
setcookie("PersistentAuth", '', array('expires' => strtotime('-1 year'), 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
setcookie("PersistentAuth", '', array('expires' => strtotime('-1 year'), 'path' => '/', 'domain' => cookie_domain(), 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user