]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 483987: Administrators can't create user accounts when using the Env authenticati...
authorlpsolit%gmail.com <>
Wed, 30 Dec 2009 14:28:38 +0000 (14:28 +0000)
committerlpsolit%gmail.com <>
Wed, 30 Dec 2009 14:28:38 +0000 (14:28 +0000)
editusers.cgi

index b415fd0b0615ffbfe0476a3b3e4b9bf9b4774636..e63f29fc5c3d2dd30b67c69ff0925c29a06e9f90 100755 (executable)
@@ -203,9 +203,14 @@ if ($action eq 'search') {
 
     check_token_data($token, 'add_user');
 
+    # When e.g. the 'Env' auth method is used, the password field
+    # is not displayed. In that case, set the password to *.
+    my $password = $cgi->param('password');
+    $password = '*' if !defined $password;
+
     my $new_user = Bugzilla::User->create({
         login_name    => scalar $cgi->param('login'),
-        cryptpassword => scalar $cgi->param('password'),
+        cryptpassword => $password,
         realname      => scalar $cgi->param('name'),
         disabledtext  => scalar $cgi->param('disabledtext'),
         disable_mail  => scalar $cgi->param('disable_mail')});