mirror of
https://github.com/webmin/webmin.git
synced 2026-05-24 23:30:25 +01:00
Fixed PAM login buglet
This commit is contained in:
10
miniserv.pl
10
miniserv.pl
@@ -927,6 +927,8 @@ $ok_code = 200;
|
||||
$ok_message = "Document follows";
|
||||
$logged_code = undef;
|
||||
$reqline = $request_uri = $page = undef;
|
||||
$authuser = undef;
|
||||
$validated = undef;
|
||||
|
||||
# check address against access list
|
||||
if (@deny && &ip_match($acptip, $localip, @deny) ||
|
||||
@@ -1857,6 +1859,8 @@ if (&get_type($full) eq "internal/cgi") {
|
||||
$baseauthuser : undef;
|
||||
$ENV{"REMOTE_PASS"} = $authpass if (defined($authpass) &&
|
||||
$config{'pass_password'});
|
||||
print DEBUG "REMOTE_USER = ",$ENV{"REMOTE_USER"},"\n";
|
||||
print DEBUG "BASE_REMOTE_USER = ",$ENV{"BASE_REMOTE_USER"},"\n";
|
||||
$ENV{"SSL_USER"} = $peername if ($validated == 2);
|
||||
$ENV{"ANONYMOUS_USER"} = "1" if ($validated == 3);
|
||||
$ENV{"DOCUMENT_ROOT"} = $roots[0];
|
||||
@@ -3941,12 +3945,12 @@ return $logout_time_cache{$user,$sid};
|
||||
|
||||
sub unix_crypt
|
||||
{
|
||||
local ($user, $pass) = @_;
|
||||
local ($pass, $salt) = @_;
|
||||
if ($use_perl_crypt) {
|
||||
return Crypt::UnixCrypt::crypt($user, $pass);
|
||||
return Crypt::UnixCrypt::crypt($pass, $salt);
|
||||
}
|
||||
else {
|
||||
return crypt($user, $pass);
|
||||
return crypt($pass, $salt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
$pragma_no_cache = 1;
|
||||
#$ENV{'MINISERV_INTERNAL'} || die "Can only be called by miniserv.pl";
|
||||
require './web-lib.pl';
|
||||
require './ui-lib.pl';
|
||||
&init_config();
|
||||
&ReadParse();
|
||||
if ($gconfig{'loginbanner'} && $ENV{'HTTP_COOKIE'} !~ /banner=1/ &&
|
||||
@@ -24,9 +25,8 @@ $sec = uc($ENV{'HTTPS'}) eq 'ON' ? "; secure" : "";
|
||||
&get_miniserv_config(\%miniserv);
|
||||
print "Set-Cookie: banner=0; path=/$sec\r\n" if ($gconfig{'loginbanner'});
|
||||
print "Set-Cookie: testing=1; path=/$sec\r\n";
|
||||
&header(undef, undef, undef, undef, 1, 1, undef, undef,
|
||||
"document.forms[0].answer.focus()'");
|
||||
print "<hr>\n";
|
||||
&ui_print_unbuffered_header(undef, undef, undef, undef, undef, 1, 1, undef,
|
||||
undef, "onLoad='document.forms[0].answer.focus()'");
|
||||
|
||||
print "<center>\n";
|
||||
if (defined($in{'failed'})) {
|
||||
@@ -82,7 +82,6 @@ print "<br>\n";
|
||||
|
||||
print "</td> </tr>\n";
|
||||
print "</table></td></tr></table><p>\n";
|
||||
print "<hr>\n";
|
||||
print "</form></center>\n";
|
||||
print "$text{'pam_postfix'}\n";
|
||||
|
||||
@@ -97,5 +96,5 @@ if (window != window.top) {
|
||||
EOF
|
||||
}
|
||||
|
||||
&footer();
|
||||
&ui_print_footer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user