From ea897010069c900f624b543af04000ce4df03438 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 28 Jul 2018 13:44:17 +0200 Subject: [PATCH 1/3] cs --- tests/Security/MockUserStorage.php | 1 + tests/bootstrap.php | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Security/MockUserStorage.php b/tests/Security/MockUserStorage.php index b81088ee..07f0a1e6 100644 --- a/tests/Security/MockUserStorage.php +++ b/tests/Security/MockUserStorage.php @@ -1,4 +1,5 @@ Date: Tue, 4 Sep 2018 17:35:31 +0200 Subject: [PATCH 2/3] Passwords: BCRYPT changed to default algorithm Warning: the result in a database column can expand beyond 60 characters! --- src/Security/Passwords.php | 2 +- tests/Security/Passwords.hash().phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Security/Passwords.php b/src/Security/Passwords.php index 19e6702f..da71f4bc 100644 --- a/src/Security/Passwords.php +++ b/src/Security/Passwords.php @@ -29,7 +29,7 @@ class Passwords /** * See http://php.net/manual/en/password.constants.php */ - public function __construct(int $algo = PASSWORD_BCRYPT, array $options = []) + public function __construct(int $algo = PASSWORD_DEFAULT, array $options = []) { $this->algo = $algo; $this->options = $options; diff --git a/tests/Security/Passwords.hash().phpt b/tests/Security/Passwords.hash().phpt index 6d6f7324..7bd529b0 100644 --- a/tests/Security/Passwords.hash().phpt +++ b/tests/Security/Passwords.hash().phpt @@ -14,7 +14,7 @@ require __DIR__ . '/../bootstrap.php'; Assert::truthy( - preg_match('#^\$2.\$\d\d\$.{53}\z#', (new Passwords)->hash('')) + preg_match('#^\$.{50,}\z#', (new Passwords)->hash('')) ); Assert::truthy( From e53bc8bb89cca1fd225b988d22230b454b953595 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 13 Sep 2018 01:40:32 +0200 Subject: [PATCH 3/3] travis: uses NCS 2 & CS 3 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 074f4534..9bf2bfb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,13 @@ jobs: php: 7.1 install: # Install Nette Code Checker - - travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress + - travis_retry composer create-project nette/code-checker temp/code-checker ^3 --no-progress # Install Nette Coding Standard - - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress + - travis_retry composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress script: - - php temp/code-checker/src/code-checker.php --short-arrays --strict-types - - php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.neon + - php temp/code-checker/code-checker --strict-types + - php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.yml - stage: Code Coverage