Skip to content

Commit 917e5e1

Browse files
zKoz210DaneEveritt
authored andcommitted
Fixed RegEx validate database password (pterodactyl#1667)
1 parent d430acf commit 917e5e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Unit/Services/Databases/DatabasePasswordServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testPasswordIsChanged()
6060
$this->dynamic->shouldReceive('set')->with('dynamic', $model->database_host_id)->once()->andReturnNull();
6161

6262
$this->encrypter->expects('encrypt')->with(m::on(function ($string) {
63-
preg_match_all('/[!@+=^-]/', $string, $matches, PREG_SET_ORDER);
63+
preg_match_all('/[!@+=.^-]/', $string, $matches, PREG_SET_ORDER);
6464
$this->assertTrue(count($matches) >= 2 && count($matches) <= 6, "Failed asserting that [{$string}] contains 2 to 6 special characters.");
6565
$this->assertTrue(strlen($string) === 24, "Failed asserting that [{$string}] is 24 characters in length.");
6666

0 commit comments

Comments
 (0)