jenkins-bot has submitted this change and it was merged.
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.
Bug: 47886
Change-Id: Ib988ad18574122a56b0d11c8888c7c41d94dea6e
---
M includes/WebResponse.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Matmarex: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/WebResponse.php b/includes/WebResponse.php
index 0deae96..c2193fb 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: merged
Gerrit-Change-Id: Ib988ad18574122a56b0d11c8888c7c41d94dea6e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Parent5446 <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits