}
$ENV{"QUERY_STRING"} = $querystring;
$ENV{"MINISERV_CONFIG"} = $config_file;
- $ENV{"HTTPS"} = "ON" if ($use_ssl || $config{'inetd_ssl'});
+ $ENV{"HTTPS"} = $use_ssl || $config{'inetd_ssl'} ? "ON" : "";
$ENV{"MINISERV_PID"} = $miniserv_main_pid;
$ENV{"SESSION_ID"} = $session_id if ($session_id);
$ENV{"LOCAL_USER"} = $localauth_user if ($localauth_user);
}
my $defport = $s->{'ssl'} ? 443 : 80;
-if ($header{'location'} =~ /^(http|https):\/\/$s->{'host'}:$s->{'port'}(.*)$/ ||
- $header{'location'} =~ /^(http|https):\/\/$s->{'host'}(.*)/ &&
- $s->{'port'} == $defport) {
+if ($header{'location'} &&
+ ($header{'location'} =~ /^(http|https):\/\/$s->{'host'}:$s->{'port'}(.*)$/||
+ $header{'location'} =~ /^(http|https):\/\/$s->{'host'}(.*)/ &&
+ $s->{'port'} == $defport)) {
# fix a redirect
&redirect("$url$2");
exit;
}
my @rv;
my $fh;
-&open_readfile($fh, $bf);
+&open_readfile($fh, $bf) || return ();
while(<$fh>) {
s/\r|\n//g;
my ($type, $who, $fails, $when) = split(/\s+/, $_);
$to = &parse_time('to');
$to = $to ? $to + 24*60*60 - 1 : time();
}
+else {
+ # All time
+ $from = $to = 0;
+ }
if ($in{'csv'}) {
print "Content-type: text/csv\n\n";
open(LOG, $webmin_logfile);
while(my ($id, $idx) = each %index) {
my ($pos, $time, $user, $module, $sid) = split(/\s+/, $idx);
+ $time ||= 0;
if (($in{'uall'} == 1 ||
$in{'uall'} == 0 && $in{'user'} eq $user ||
$in{'uall'} == 3 && $in{'ouser'} eq $user ||
my $desc = &get_action_description($act, 0);
my $anno = &get_annotation($act);
push(@cols, "<a href='view.cgi?id=$act->{'id'}".
- "&return=".&urlize($in{'return'}).
- "&returndesc=".&urlize($in{'returndesc'}).
- "&search=".&urlize($in).
+ "&return=".&urlize($in{'return'} || "").
+ "&returndesc=".&urlize($in{'returndesc'} || "").
+ "&search=".&urlize($in || "").
"'>$desc</a>");
if ($anno) {
$cols[$#cols] .= " <img src=images/star.gif>";