minor #26424 [SecurityBundle] Make extra character non mandatory in regex (DavidPrevot)

This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Make extra character non mandatory in regex

The extra character was introduced in 5f9471e, and breaks the testsuite
in native php 7.2.

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

44b4fc8 [SecurityBundle] Make extra character non mandatory in regex
This commit is contained in:
Robin Chalas 2018-03-06 10:27:07 +01:00
commit 07cccd53df

View File

@ -86,7 +86,7 @@ class UserPasswordEncoderCommandTest extends WebTestCase
$this->assertContains('Password encoding succeeded', $output);
$encoder = new Argon2iPasswordEncoder();
preg_match('# Encoded password\s+(\$argon2id\$[\w\d,=\$+\/]+={0,2})\s+#', $output, $matches);
preg_match('# Encoded password\s+(\$argon2id?\$[\w\d,=\$+\/]+={0,2})\s+#', $output, $matches);
$hash = $matches[1];
$this->assertTrue($encoder->isPasswordValid($hash, 'password', null));
}