Do not hardcode secure flag in examples

We can not assume that setup will be https by default, so having false
as default is safer.

Fixes #13758

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-10-20 11:24:00 +02:00
parent 3a625bcd1f
commit f2dcdfff50
2 changed files with 7 additions and 2 deletions

View File

@ -20,6 +20,9 @@ if (false === @include_once 'OpenID/RelyingParty.php') {
exit;
}
/* Change this to true if using phpMyAdmin over https */
$secure_cookie = false;
/**
* Map of authenticated users to MySQL user/password pairs.
*/
@ -74,7 +77,7 @@ function Die_error($e)
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', true, true);
session_set_cookie_params(0, '/', '', $secure_cookie, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);

View File

@ -11,8 +11,10 @@
* @subpackage Example
*/
/* Change this to true if using phpMyAdmin over https */
$secure_cookie = false;
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', true, true);
session_set_cookie_params(0, '/', '', $secure_cookie, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);