diff --git a/software/apt-lib.pl b/software/apt-lib.pl index 8282c03a6..4f3b7dbde 100755 --- a/software/apt-lib.pl +++ b/software/apt-lib.pl @@ -43,7 +43,7 @@ foreach (0..100) { # Run the command &clean_language(); -&open_execute_command(CMD, "$cmd <$yesfile", 2); +&open_execute_command(CMD, "$cmd <".quotemeta($yesfile), 2); while() { if (/setting\s+up\s+(\S+)/i && !/as\s+MDA/i) { push(@rv, $1); diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 1fe6519cd..4897b2a28 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -1636,7 +1636,9 @@ by the message setup using that function. sub error { $main::no_miniserv_userdb = 1; +&globals('set', 'error-fatal-ignored', 1); return if $main::ignore_errors; +&globals('set', 'error-fatal', 1); my $msg = join("", @_); $msg =~ s/<[^>]*>//g; my $error_details = (($ENV{'WEBMIN_DEBUG'} || $gconfig{'debug_enabled'}) ? "" : "\n"); diff --git a/webmin/change_log.cgi b/webmin/change_log.cgi index 24bc9f3aa..36e9dfce6 100755 --- a/webmin/change_log.cgi +++ b/webmin/change_log.cgi @@ -8,6 +8,7 @@ require './webmin-lib.pl'; &lock_file($ENV{'MINISERV_CONFIG'}); &get_miniserv_config(\%miniserv); +my ($miniserv_log, $in_log) = ($miniserv{'log'}, $in{'log'}); $miniserv{'log'} = $in{'log'}; $miniserv{'loghost'} = $in{'loghost'}; $miniserv{'logclf'} = $in{'logclf'}; @@ -61,6 +62,14 @@ $gconfig{'logsyslog'} = $in{'logsyslog'} if (defined($in{'logsyslog'})); &write_file("$config_directory/config", \%gconfig); &unlock_file("$config_directory/config"); +# Clear links in Virtualmin module if installed +if ($miniserv_log != $in_log) { + if (&foreign_available('virtual-server')) { + &foreign_require("virtual-server"); + &virtual_server::clear_links_cache(); + } + } + &show_restart_page(); &webmin_log("log", undef, undef, \%in); diff --git a/webmin/letsencrypt-lib.pl b/webmin/letsencrypt-lib.pl index 0477ab1de..d95b56b2d 100755 --- a/webmin/letsencrypt-lib.pl +++ b/webmin/letsencrypt-lib.pl @@ -322,7 +322,7 @@ else { ($mode eq "web" ? "--acme-dir ".quotemeta($challenge)." " : "--dns-hook $dns_hook ". "--cleanup-hook $cleanup_hook "). - ($staging ? "--ca https://acme-staging.api.letsencrypt.org " + ($staging ? "--ca https://acme-staging-v02.api.letsencrypt.org " : "--disable-check "). "--quiet ". "2>&1 >".quotemeta($cert)); diff --git a/webminlog/search.cgi b/webminlog/search.cgi index 50820c481..c0dca1ffe 100755 --- a/webminlog/search.cgi +++ b/webminlog/search.cgi @@ -63,7 +63,7 @@ if ($in{'csv'}) { &PrintHeader(undef, "text/csv"); } else { - &ui_print_header(undef, $text{'search_title'}, ""); + &ui_print_header(undef, &html_escape($in{'search_title'} || $text{'search_title'}), "", undef, undef, $in{'no_return'}); } # Perform initial search in index @@ -179,15 +179,15 @@ if ($in{'csv'}) { elsif (@match) { # Show search results in table if ($in{'sid'}) { - print "",&text('search_sid', "$match[0]->{'user'}", + print "",&text('search_sid', "$match[0]->{'user'}", "$in{'sid'}")," ..

\n"; } elsif ($in{'uall'} == 1 && $in{'mall'} && $in{'tall'}) { - print "$text{'search_critall'} ..

\n"; + print "$text{'search_critall'} ..

\n"; } else { my %minfo = &get_module_info($in{'module'}) if (!$in{'mall'}); - print "$text{'search_crit'} $searchmsg ...

\n"; + print "$text{'search_crit'} $searchmsg ...

\n"; } print &ui_columns_start( [ $text{'search_action'}, @@ -216,6 +216,7 @@ elsif (@match) { push(@cols, &ui_link("view.cgi?id=$act->{'id'}". "&return=".&urlize($in{'return'} || ""). "&returndesc=".&urlize($in{'returndesc'} || ""). + "&no_return=".&urlize($in{'no_return'} || ""). "&file=".($in{'fall'} ? "" : &urlize($in{'file'})). "&search=".&urlize($in || ""), &filter_javascript($desc)) ); @@ -240,7 +241,7 @@ else { print "

$text{'search_none2'} $searchmsg.

\n"; } -if (!$in{'csv'}) { +if (!$in{'csv'} && !$in{'no_return'}) { # Show page footer if ($in{'return'}) { &ui_print_footer($in{'return'}, $in{'returndesc'}); diff --git a/webminlog/view.cgi b/webminlog/view.cgi index a511cac3f..a26844e9f 100755 --- a/webminlog/view.cgi +++ b/webminlog/view.cgi @@ -14,7 +14,7 @@ my $act = &get_action($in{'id'}); &can_mod($act->{'module'}) || &error($text{'view_ecannot'}); # display info about the action -&ui_print_header(undef, $text{'view_title'}, ""); +&ui_print_header(undef, $text{'view_title'}, "", undef, undef, $in{'no_return'}); my @files = &list_files($act); print &ui_form_start("rollback.cgi"); @@ -166,9 +166,8 @@ if (@files && $rbcount) { else { print &ui_form_end(); } - -&ui_print_footer("search.cgi?search=".&urlize($in{'search'}), - $text{'search_return'}, - "", $text{'index_return'}); +my @return_index = $in{'no_return'} ? ( ) : ("", $text{'index_return'}); +&ui_print_footer("search.cgi?search=".&urlize($in{'search'}), $text{'search_return'}, + @return_index);