Parent5446 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/61593
Change subject: Fixed $wgCookieExpiration functionality when set to 0.
......................................................................
Fixed $wgCookieExpiration functionality when set to 0.
When $wgCookieExpiration is set to 0, cookies should
by default expire when the browser closes. However,
MediaWiki accidentally interpreted this as the cookies
expiring 0 seconds from the request time.
Change-Id: Ib988ad18574122a56b0d11c8888c7c41d94dea6e
---
M includes/WebResponse.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/93/61593/1
diff --git a/includes/WebResponse.php b/includes/WebResponse.php
index d1f645c..f8b75aa 100644
--- a/includes/WebResponse.php
+++ b/includes/WebResponse.php
@@ -54,7 +54,7 @@
public function setcookie( $name, $value, $expire = 0, $prefix = null,
$domain = null, $forceSecure = null ) {
global $wgCookiePath, $wgCookiePrefix, $wgCookieDomain;
global $wgCookieSecure, $wgCookieExpiration, $wgCookieHttpOnly;
- if ( $expire == 0 ) {
+ if ( $expire == 0 && $wgCookieExpiration != 0 ) {
$expire = time() + $wgCookieExpiration;
}
if ( $prefix === null ) {
--
To view, visit https://gerrit.wikimedia.org/r/61593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib988ad18574122a56b0d11c8888c7c41d94dea6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Parent5446 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits