Commit 857af905 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Correcting typoes in cookie-issuing code

Bug 1570744: Accidentally used set_cookie() instead of
setcookie(). This makes the cookie break if you use
the $cfg->cookieprefix setting.

behatnotneeded: Covered by existing tests

Change-Id: Idec3676222e3ff4eb22f7925de6bec10cfa35755
parent ebae1e23
......@@ -385,7 +385,10 @@ class Session {
// will be ignored, and instead the old session cookie will
// be replaced by the new one.)
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time() - 65536,
setcookie(
session_name(),
'',
1,
ini_get('session.cookie_path'),
ini_get('session.cookie_domain'),
ini_get('session.cookie_secure'),
......@@ -549,10 +552,11 @@ function clear_duplicate_cookies() {
// Now manually regenerate just ONE session cookie header.
if ($SESSION->session_id()) {
set_cookie(
setcookie(
$cookiename,
$SESSION->session_id(),
0,
ini_get('session.cookie_path'),
ini_get('session.cookie_domain'),
ini_get('session.cookie_secure'),
ini_get('session.cookie_httponly')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment