diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-05-21 16:10:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 16:10:14 +0300 |
commit | 1f387ccb50e4fd2819b7ec662d9fced1d1169f14 (patch) | |
tree | 9bf5a4f23195969c93070a686b47d075fad8495d | |
parent | 9f03e3765890c8348cd1548d6b2e9cc6188131ee (diff) | |
parent | af03a69bfda767b0e370d4d9d0ad4ca96dfd9b65 (diff) |
Merge pull request #147 from nextcloud/enh/default_length_10v22.0.0beta1
Set default password policy length to 10
-rw-r--r-- | lib/PasswordPolicyConfig.php | 3 | ||||
-rw-r--r-- | tests/lib/PasswordPolicyConfigTest.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/PasswordPolicyConfig.php b/lib/PasswordPolicyConfig.php index e13f87a..51ff5ec 100644 --- a/lib/PasswordPolicyConfig.php +++ b/lib/PasswordPolicyConfig.php @@ -53,8 +53,7 @@ class PasswordPolicyConfig { * @return int */ public function getMinLength(): int { - $minLength = $this->config->getAppValue('password_policy', 'minLength', '8'); - return (int)$minLength; + return (int)$this->config->getAppValue('password_policy', 'minLength', '10'); } /** diff --git a/tests/lib/PasswordPolicyConfigTest.php b/tests/lib/PasswordPolicyConfigTest.php index 2a84f5c..a924964 100644 --- a/tests/lib/PasswordPolicyConfigTest.php +++ b/tests/lib/PasswordPolicyConfigTest.php @@ -45,7 +45,7 @@ class PasswordPolicyConfigTest extends TestCase { $expected = 42; $this->config->expects($this->once())->method('getAppValue') - ->with('password_policy', 'minLength', '8') + ->with('password_policy', 'minLength', '10') ->willReturn($appConfigValue); $this->assertSame($expected, |