From d85bbb0d2e32f385fcb267fd123ea753b76afed0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 30 Dec 2009 14:28:38 +0000 Subject: Bug 483987: Administrators can't create user accounts when using the Env authentication method - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editusers.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editusers.cgi b/editusers.cgi index b415fd0b0..e63f29fc5 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -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')}); -- cgit v1.2.3-24-g4f1b