Skip to content

Commit

Permalink
Password may not always be set
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed May 29, 2018
1 parent e9b6efc commit ae5b426
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ sub feature_setup
$gitfile = "$phd/git/$gitfile";
&virtual_server::copy_source_dest_as_domain_user($d, $src, $gitfile);
}
my $gitconf = "$phd/git/gitweb_config.perl";
if (!-r $gitconf) {
my $lref = &virtual_server::read_file_lines_as_domain_user($d, $gitconf);
push(@$lref, '$stylesheet = "gitweb.css";');
push(@$lref, '$logo = "git-logo.png";');
push(@$lref, '$favicon = "git-favicon.png";');
push(@$lref, '$javascript = "gitweb.js";');
&virtual_server::flush_file_lines_as_domain_user($d, $gitconf);
}
&$virtual_server::second_print($virtual_server::text{'setup_done'});

# Set default limit from template
Expand Down Expand Up @@ -657,7 +666,7 @@ sub mailbox_modify
}
}

if ($user->{'passmode'} == 3) {
if ($user->{'passmode'} && $user->{'passmode'} == 3) {
# Password was changed
$suser->{'pass'} = $user->{'pass_crypt'} ||
&htaccess_htpasswd::encrypt_password($user->{'plainpass'});
Expand Down

0 comments on commit ae5b426

Please sign in to comment.