aboutsummaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-12-30 14:28:38 +0000
committerlpsolit%gmail.com <>2009-12-30 14:28:38 +0000
commitd85bbb0d2e32f385fcb267fd123ea753b76afed0 (patch)
treeb47d648c7f4e2615c2c5e89375ab3f84fcfdc37a /editusers.cgi
parent60d33f28276b5a72b10bad42fb61fe030d88119e (diff)
downloadbugs-d85bbb0d2e32f385fcb267fd123ea753b76afed0.tar
bugs-d85bbb0d2e32f385fcb267fd123ea753b76afed0.tar.gz
bugs-d85bbb0d2e32f385fcb267fd123ea753b76afed0.tar.bz2
bugs-d85bbb0d2e32f385fcb267fd123ea753b76afed0.tar.xz
bugs-d85bbb0d2e32f385fcb267fd123ea753b76afed0.zip
Bug 483987: Administrators can't create user accounts when using the Env authentication method - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi7
1 files changed, 6 insertions, 1 deletions
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')});