From 917e5e19aa9c0a5721bfb915c4d4c0fa1bb8c9e4 Mon Sep 17 00:00:00 2001 From: Oreo Oreoniv <28255085+zKoz210@users.noreply.github.com> Date: Mon, 5 Aug 2019 20:02:31 +0300 Subject: [PATCH] Fixed RegEx validate database password (#1667) --- tests/Unit/Services/Databases/DatabasePasswordServiceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/Services/Databases/DatabasePasswordServiceTest.php b/tests/Unit/Services/Databases/DatabasePasswordServiceTest.php index c01793677..6edb79022 100644 --- a/tests/Unit/Services/Databases/DatabasePasswordServiceTest.php +++ b/tests/Unit/Services/Databases/DatabasePasswordServiceTest.php @@ -60,7 +60,7 @@ class DatabasePasswordServiceTest extends TestCase $this->dynamic->shouldReceive('set')->with('dynamic', $model->database_host_id)->once()->andReturnNull(); $this->encrypter->expects('encrypt')->with(m::on(function ($string) { - preg_match_all('/[!@+=^-]/', $string, $matches, PREG_SET_ORDER); + preg_match_all('/[!@+=.^-]/', $string, $matches, PREG_SET_ORDER); $this->assertTrue(count($matches) >= 2 && count($matches) <= 6, "Failed asserting that [{$string}] contains 2 to 6 special characters."); $this->assertTrue(strlen($string) === 24, "Failed asserting that [{$string}] is 24 characters in length.");