From: Arthur Date: Wed, 2 Sep 2015 15:55:11 +0000 (+0200) Subject: Merge pull request #336 from ArthurHoaro/login-hotfix X-Git-Tag: 0.5.3 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=67ee1435f8a92894b6bf08404b5d26a3141c0b9e;hp=53cc2b93b85a080c6c06bc3633fb454241fc5699;p=github%2Fshaarli%2FShaarli.git Merge pull request #336 from ArthurHoaro/login-hotfix Allow uppercase letters in PHP sessionid format --- diff --git a/application/Utils.php b/application/Utils.php old mode 100644 new mode 100755 index fa18f158..cb03f11c --- a/application/Utils.php +++ b/application/Utils.php @@ -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; } diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php old mode 100644 new mode 100755 index e39ce6be..5175dde0 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php @@ -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')); } /**