SessionManager: Abstract forceHTTPS cookie setting
authorBrad Jorsch <bjorsch@wikimedia.org>
Sat, 23 Jan 2016 17:34:27 +0000 (12:34 -0500)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 25 Jan 2016 03:53:06 +0000 (03:53 +0000)
commit2c34aeea72471f9a598e67bdbf34bc5f9fb3f0c5
tree772db595040e526acf13fdcc9876db19a5cd77dc
parent4d6d06253b28ee1fac28301ef596d78c1ba7859b
SessionManager: Abstract forceHTTPS cookie setting

This allows CentralAuthSessionProvider to avoid doing craziness like
this all the time:

  Set-Cookie: forceHTTPS=true; path=/; httponly
  Set-Cookie: forceHTTPS=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; httponly
  Set-Cookie: forceHTTPS=true; path=/; domain=.wikipedia.org; httponly
  Set-Cookie: forceHTTPS=true; path=/; httponly
  Set-Cookie: forceHTTPS=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; httponly
  Set-Cookie: forceHTTPS=true; path=/; domain=.wikipedia.org; httponly

Bug: T124421
Change-Id: I7e02afd032a246df6850208c26d3447798bc0fc2
includes/session/CookieSessionProvider.php
tests/phpunit/includes/session/CookieSessionProviderTest.php