Skip to content

Commit

Permalink
Merge pull request #547 from sgerlach/cookie-domain
Browse files Browse the repository at this point in the history
Checking for localhost in cookie domain setting
  • Loading branch information
digininja committed Mar 22, 2023
2 parents 271d1ab + 992e5cf commit 97c8d23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dvwa/includes/dvwaPage.inc.php
Expand Up @@ -42,11 +42,12 @@

$maxlifetime = 86400;
$secure = false;
$domain = parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST);

session_set_cookie_params([
'lifetime' => $maxlifetime,
'path' => '/',
'domain' => $_SERVER['HTTP_HOST'],
'domain' => $domain,
'secure' => $secure,
'httponly' => $httponly,
'samesite' => $samesite
Expand Down

0 comments on commit 97c8d23

Please sign in to comment.