diff options
| author | Stefan Esser | 2014-02-15 12:18:37 +0100 |
|---|---|---|
| committer | Stefan Esser | 2014-02-15 12:18:37 +0100 |
| commit | 13d2a1cbba22ead86f54f1764ca4f87857059803 (patch) | |
| tree | 74baa31bfd2e1ee92b298f9960762e9faab4f152 | |
| parent | 71c70de8df61ff1446efb1c168d3c2deccf58586 (diff) | |
Adding a few more session id tests
| -rw-r--r-- | tests/session/PHPSESSID_max_id_length_ok.phpt | 15 | ||||
| -rw-r--r-- | tests/session/PHPSESSID_max_id_length_toolong.phpt | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/session/PHPSESSID_max_id_length_ok.phpt b/tests/session/PHPSESSID_max_id_length_ok.phpt new file mode 100644 index 0000000..0bb90bc --- /dev/null +++ b/tests/session/PHPSESSID_max_id_length_ok.phpt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | --TEST-- | ||
| 2 | PHPSESSID session id not too long | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.session.max_id_length=32 | ||
| 7 | --COOKIE-- | ||
| 8 | PHPSESSID=12345678901234567890123456789012; | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | session_start(); | ||
| 12 | echo session_id(); | ||
| 13 | ?> | ||
| 14 | --EXPECTF-- | ||
| 15 | 12345678901234567890123456789012 \ No newline at end of file | ||
diff --git a/tests/session/PHPSESSID_max_id_length_toolong.phpt b/tests/session/PHPSESSID_max_id_length_toolong.phpt new file mode 100644 index 0000000..e6667b1 --- /dev/null +++ b/tests/session/PHPSESSID_max_id_length_toolong.phpt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | --TEST-- | ||
| 2 | PHPSESSID session id too long | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.session.max_id_length=32 | ||
| 7 | --COOKIE-- | ||
| 8 | PHPSESSID=123456789012345678901234567890123; | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | session_start(); | ||
| 12 | echo strlen(session_id()); | ||
| 13 | ?> | ||
| 14 | --EXPECTF-- | ||
| 15 | 32 \ No newline at end of file | ||
