diff --git a/lib/PasswordPolicyConfig.php b/lib/PasswordPolicyConfig.php index e13f87a1..54fea992 100644 --- a/lib/PasswordPolicyConfig.php +++ b/lib/PasswordPolicyConfig.php @@ -161,10 +161,15 @@ public function setEnforceSpecialCharacters(bool $enforceSpecialCharacters) { * @return bool */ public function getEnforceHaveIBeenPwned(): bool { + $hasInternetConnection = $this->config->getSystemValue('has_internet_connection', true); + if (!$hasInternetConnection) { + return false; + } + return $this->config->getAppValue( 'password_policy', 'enforceHaveIBeenPwned', - '0' + '1' ) === '1'; }