diff options
author | VirtualTam <virtualtam@flibidi.net> | 2015-08-24 21:25:33 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2015-08-24 21:25:33 +0200 |
commit | ce8e248ab04a035c2824bee6af91aed49d623a6a (patch) | |
tree | 8f783db3787970bb2aa4ab3529f5506f9fc898e6 /tests | |
parent | b5d96e9b1f2a7be463ca33a66ab51819870cd4bd (diff) | |
parent | 06b6660a7e8891c6e1c47815cf50ee5b2ef5f270 (diff) | |
download | Shaarli-ce8e248ab04a035c2824bee6af91aed49d623a6a.tar.gz Shaarli-ce8e248ab04a035c2824bee6af91aed49d623a6a.tar.zst Shaarli-ce8e248ab04a035c2824bee6af91aed49d623a6a.zip |
Merge pull request #306 from ArthurHoaro/fpd
Avoid Full Path Disclosure error on session error.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/UtilsTest.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 28e15f5a..e39ce6be 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php | |||
@@ -150,5 +150,22 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
150 | { | 150 | { |
151 | checkPHPVersion('5.3', '5.2'); | 151 | checkPHPVersion('5.3', '5.2'); |
152 | } | 152 | } |
153 | |||
154 | /** | ||
155 | * Test is_session_id_valid with a valid ID. | ||
156 | */ | ||
157 | public function testIsSessionIdValid() | ||
158 | { | ||
159 | $this->assertTrue(is_session_id_valid('123456789012345678901234567890az')); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * Test is_session_id_valid with invalid IDs. | ||
164 | */ | ||
165 | public function testIsSessionIdInvalid() | ||
166 | { | ||
167 | $this->assertFalse(is_session_id_valid('')); | ||
168 | $this->assertFalse(is_session_id_valid(array())); | ||
169 | $this->assertFalse(is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=')); | ||
170 | } | ||
153 | } | 171 | } |
154 | ?> | ||