Skip to content

Commit 43c26b9

Browse files
committed
Session: enabled PHP option use_strict_mode
1 parent b5a0076 commit 43c26b9

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/Http/Session.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Session
3535
'use_cookies' => 1, // must be enabled to prevent Session Hijacking and Fixation
3636
'use_only_cookies' => 1, // must be enabled to prevent Session Fixation
3737
'use_trans_sid' => 0, // must be disabled to prevent Session Hijacking and Fixation
38+
'use_strict_mode' => 1, // must be enabled to prevent Session Fixation
3839

3940
// cookies
4041
'cookie_lifetime' => 0, // until the browser is closed

tests/Http/Session.cookies.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Assert::same([
2323
'use_cookies' => 1,
2424
'use_only_cookies' => 1,
2525
'use_trans_sid' => 0,
26+
'use_strict_mode' => 1,
2627
'cookie_lifetime' => 0,
2728
'cookie_httponly' => true,
2829
'cookie_samesite' => 'Lax',

tests/Http/Session.setOptions.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Assert::same([
2020
'use_cookies' => 1,
2121
'use_only_cookies' => 1,
2222
'use_trans_sid' => 0,
23+
'use_strict_mode' => 1,
2324
'cookie_lifetime' => 0,
2425
'cookie_httponly' => true,
2526
'cookie_samesite' => 'Lax',
@@ -38,6 +39,7 @@ Assert::same([
3839
'use_cookies' => 1,
3940
'use_only_cookies' => 1,
4041
'use_trans_sid' => 0,
42+
'use_strict_mode' => 1,
4143
'cookie_lifetime' => 0,
4244
'cookie_httponly' => true,
4345
'cookie_samesite' => 'Lax',
@@ -55,6 +57,7 @@ Assert::same([
5557
'use_cookies' => 1,
5658
'use_only_cookies' => 1,
5759
'use_trans_sid' => 0,
60+
'use_strict_mode' => 1,
5861
'cookie_lifetime' => 0,
5962
'cookie_httponly' => true,
6063
'cookie_samesite' => 'Lax',

0 commit comments

Comments
 (0)