* Fri Feb 21 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-5.sme
- password requirement is different in panel and from samba [SME: 12382]
This commit is contained in:
@@ -798,26 +798,7 @@ sub validate_password
|
||||
{
|
||||
my ($fm,$strength,$pass) = @_;
|
||||
|
||||
use Crypt::Cracklib;
|
||||
|
||||
my $reason;
|
||||
|
||||
if ($strength eq "none") {
|
||||
return $fm->localise("Passwords must be at least 7 characters long") unless (length($pass) > 6);
|
||||
return "OK";
|
||||
}
|
||||
|
||||
$reason = $fm->call_fm_validation('password', $pass, undef);
|
||||
|
||||
return $reason unless ($reason eq "OK");
|
||||
return "OK" unless ($strength eq "strong");
|
||||
|
||||
if ( -f '/usr/lib64/cracklib_dict.pwd' ) {
|
||||
$reason = fascist_check($pass, '/usr/lib64/cracklib_dict');
|
||||
} else {
|
||||
$reason = fascist_check($pass, '/usr/lib/cracklib_dict');
|
||||
}
|
||||
$reason ||= "Software error: password check failed";
|
||||
my $reason = esmith::util::validatePassword($pass,$strength);
|
||||
|
||||
return "OK" if ($reason eq "ok");
|
||||
|
||||
|
Reference in New Issue
Block a user