From d85bbb0d2e32f385fcb267fd123ea753b76afed0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 30 Dec 2009 14:28:38 +0000 Subject: =?UTF-8?q?Bug=20483987:=20Administrators=20can't=20create=20user?= =?UTF-8?q?=20accounts=20when=20using=20the=20Env=20authentication=20metho?= =?UTF-8?q?d=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20?= =?UTF-8?q?=20r/a=3Dmkanat?= 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(-) (limited to 'editusers.cgi') 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.1