Use samesite=strict for the login session cookie

This commit is contained in:
Eric Schultz
2019-09-16 03:00:34 -05:00
parent dda07223a1
commit 655b3ed883
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
session_name("unraid_".md5(strstr($_SERVER['HTTP_HOST'].':', ':', true)));
session_set_cookie_params(0, '/', null, array_key_exists('HTTPS', $_SERVER), true);
session_set_cookie_params(0, '/; samesite=strict', null, array_key_exists('HTTPS', $_SERVER), true);
session_start();
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';