]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
proxy.cgi: Switch to MD5 hashed passwords for local user auth.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 7 Feb 2020 11:06:39 +0000 (12:06 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 16 Feb 2020 15:49:13 +0000 (15:49 +0000)
The former used default Crypt algorithmus only supports passwords up to
eight signs wheater MD5 does not have any limitation here.

Fixes 12290.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/proxy.cgi

index b639640817a1c1ae2013123dd83d5a89409684ef..06aca579b9e63837ce801df74589becae8f9c813 100644 (file)
@@ -3945,7 +3945,13 @@ sub adduser
        } else {
                &deluser($str_user);
 
-               my $htpasswd = new Apache::Htpasswd("$userdb");
+               my %htpasswd_options = (
+                       passwdFile => "$userdb",
+                       UseMD5 => 1,
+               );
+
+               my $htpasswd = new Apache::Htpasswd(\%htpasswd_options);
+
                $htpasswd->htpasswd($str_user, $str_pass);
        }