summaryrefslogtreecommitdiffstats
path: root/perl-install/authentication.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r--perl-install/authentication.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index 664eb49ae..638cb7f92 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -815,6 +815,9 @@ sub salt {
sub user_crypted_passwd {
my ($u, $isMD5) = @_;
if ($u->{password}) {
+ require utf8;
+ utf8::encode($u->{password}); #- we don't want perl to do "smart" things in crypt()
+
crypt($u->{password}, $isMD5 ? '$1$' . salt(8) : salt(2));
} else {
$u->{pw} || '';