]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #336 from ArthurHoaro/login-hotfix 0.5.3
authorArthur <arthur@hoa.ro>
Wed, 2 Sep 2015 15:55:11 +0000 (17:55 +0200)
committerArthur <arthur@hoa.ro>
Wed, 2 Sep 2015 15:55:11 +0000 (17:55 +0200)
Allow uppercase letters in PHP sessionid format

application/Utils.php [changed mode: 0644->0755]
tests/UtilsTest.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index fa18f15..cb03f11
@@ -156,7 +156,7 @@ function is_session_id_valid($sessionId)
         return false;
     }
 
-    if (!preg_match('/^[a-z0-9]{2,32}$/', $sessionId)) {
+    if (!preg_match('/^[a-z0-9]{2,32}$/i', $sessionId)) {
         return false;
     }
 
old mode 100644 (file)
new mode 100755 (executable)
index e39ce6b..5175dde
@@ -156,7 +156,7 @@ class UtilsTest extends PHPUnit_Framework_TestCase
      */
     public function testIsSessionIdValid()
     {
-        $this->assertTrue(is_session_id_valid('123456789012345678901234567890az'));
+        $this->assertTrue(is_session_id_valid('azertyuiop123456789AZERTYUIOP1aA'));
     }
 
     /**