Compare commits

...

53 Commits

Author SHA1 Message Date
Ilia Ross
2c8ec1bfff Fix not to return short hostname unless set 2023-08-25 15:58:35 +03:00
Ilia Ross
30e6360fa2 Update CHANGELOG.md 2023-08-24 00:58:40 +03:00
Jamie Cameron
dda9290ff5 minor version bump 2023-08-23 11:53:53 -07:00
Jamie Cameron
15a00d8119 Remove perl module dependency and just use glob instead 2023-08-23 11:49:00 -07:00
Jamie Cameron
9289083171 No need for BEGIN block 2023-08-23 10:54:20 -07:00
Jamie Cameron
3d482d2bf5 Support CF-Connecting-IPv6 header 2023-08-22 18:46:43 -07:00
Jamie Cameron
318150e6b0 Merge branch 'master' of github.com:webmin/webmin 2023-08-21 17:18:53 -07:00
Jamie Cameron
8939b060b4 Clean up diff dirs so they don't get package up https://forum.virtualmin.com/t/debian-upgrade-nwe-directories-in-root-and-orig-directories-left-after-upgrade-completed/122241/8 2023-08-21 17:18:46 -07:00
Ilia Ross
4709ff6adf Add support for odd Amazon Linux interface names 2023-08-22 01:52:22 +03:00
Jamie Cameron
31af9f996c Also support CF-Connecting-IP https://github.com/webmin/webmin/issues/1956 2023-08-21 10:04:16 -07:00
Jamie Cameron
c716443737 Merge branch 'master' of github.com:webmin/webmin 2023-08-20 21:22:15 -07:00
Jamie Cameron
fd06605f51 Add support for True-Client-IP header as used by Cloudflare https://github.com/webmin/webmin/issues/1956 2023-08-20 21:22:08 -07:00
Ilia Ross
c8f6b05987 Add Config::IniFiles to vendor_perl [build]
* Amazon Linux doesn't have it available anywhere
2023-08-20 15:24:12 +03:00
Ilia Ross
a90dbc5f33 Fix not to print HTML in stdout 2023-08-20 14:08:31 +03:00
Ilia Ross
7fc16f8948 Update CHANGELOG.md 2023-08-19 18:22:16 +03:00
Ilia Ross
a2f1f24a95 Fix Apache graceful restart
https://github.com/virtualmin/virtualmin-gpl/issues/613
2023-08-18 16:15:36 +03:00
Ilia Ross
825b928168 Fix not to escape HTML unless sent to UI 2023-08-18 12:57:43 +03:00
Jamie Cameron
de648c24bd Expand range of versions 2023-08-17 18:28:11 -07:00
Ilia Ross
907818d2a4 Fix SpamAssassin config for Debian 12 2023-08-17 22:45:14 +03:00
Jamie Cameron
60a79e67d4 Merge branch 'master' of github.com:webmin/webmin 2023-08-16 20:41:14 -07:00
Jamie Cameron
04a3b8b5e6 Suppress output from monitor.pl https://github.com/webmin/webmin/issues/1984 2023-08-16 20:41:04 -07:00
Ilia Ross
dd1b4bc77b Fix to also set UCF_FORCE_CONFFOLD variable
https://github.com/virtualmin/virtualmin-gpl/issues/612
2023-08-16 15:12:18 +03:00
Ilia Ross
5156a472be Fix a bug in regex to correctly grep wack [build]
https://sourceforge.net/p/webadmin/discussion/55377/thread/78e5aa05f3
2023-08-16 13:48:54 +03:00
Ilia Ross
185e7db58d Revert "Revert "Fix to priorities ip command usage""
This reverts commit f8ec917bc5.
2023-08-16 13:03:51 +03:00
Ilia Ross
f8ec917bc5 Revert "Fix to priorities ip command usage"
This reverts commit 3b36dfa8ad.
2023-08-16 13:01:17 +03:00
Jamie Cameron
1016ec5f1d HTML escape more fields 2023-08-15 22:16:09 -07:00
Jamie Cameron
8a6d4cfefd Escape some more inputs 2023-08-15 22:15:10 -07:00
Jamie Cameron
7cbbdc898a More HTML escaping 2023-08-15 22:13:14 -07:00
Jamie Cameron
8db4074d4d HTML escape more stuff 2023-08-15 21:18:50 -07:00
Jamie Cameron
f6c48e7a11 Merge branch 'master' of github.com:webmin/webmin 2023-08-15 21:14:14 -07:00
Jamie Cameron
9ae54e61bd Escape search input 2023-08-15 21:13:53 -07:00
Ilia Ross
e917f33e09 Fix to correctly compare Webmin version being semantic version 2023-08-15 17:15:13 +03:00
Jamie Cameron
38aa06b8c6 Merge branch 'master' of github.com:webmin/webmin 2023-08-14 23:03:00 -07:00
Jamie Cameron
57e710e8a6 Small code cleanup 2023-08-14 23:02:35 -07:00
Ilia Ross
0d9d978f72 Fix APT repos
https://forum.virtualmin.com/t/switch-to-new-webmin-repository-url-doesnt-work/121851/5?u=ilia
2023-08-12 11:17:33 +03:00
Jamie Cameron
196b886ddb Merge branch 'master' of github.com:webmin/webmin 2023-08-11 20:36:22 -07:00
Jamie Cameron
4197e61772 Allow use of proxied SSL client name even when in non-SSL mode https://github.com/webmin/webmin/issues/1962 2023-08-11 20:35:57 -07:00
Ilia Ross
6dc87705d9 Fix to always fix Debian repo in the new format 2023-08-11 14:05:08 +03:00
Jamie Cameron
4b59570a82 Merge branch 'master' of github.com:webmin/webmin 2023-08-10 08:14:37 -07:00
Ilia Ross
33927e07ae Fix missing semicolon 2023-08-10 15:10:04 +03:00
Ilia Ross
65444b8865 Fix Terminal focus bug 2023-08-10 14:25:00 +03:00
Jamie Cameron
5357b084af Deal with case where there is no address https://sourceforge.net/p/webadmin/bugs/5630/ 2023-08-09 22:58:31 -07:00
Ilia Ross
862bbc36df Fix to address XSS issues #4 2023-08-09 19:07:13 +03:00
Ilia Ross
e6105bb757 Fix to address XSS issues #1 2023-08-09 16:49:40 +03:00
Ilia Ross
864e0c4918 Fix Cron edit files manually page not display directories #1978 [build] 2023-08-09 14:23:41 +03:00
Ilia Ross
115c5763a3 Fix Postfix edit files manually page not display directories #1978 [build] 2023-08-09 12:46:21 +03:00
Ilia Ross
d6e307d59a Fix not to use new lines to avoid color overflow 2023-08-08 23:19:34 +03:00
iliajie
9dc21ace2d Fix CHANGELOG.md 2023-08-08 14:24:06 +03:00
iliajie
c500759d83 Fix to simplify the code 2023-08-07 21:52:22 +03:00
iliajie
736d30ef76 Fix to display error message cleanly #1975 2023-08-07 19:44:47 +03:00
Jamie Cameron
a27095f40f Merge branch 'master' of github.com:webmin/webmin 2023-08-06 09:51:06 -07:00
Jamie Cameron
60a3b3b4a9 Make sure NSEC3PARAM record is always deleted https://github.com/virtualmin/virtualmin-gpl/issues/604 2023-08-06 09:50:43 -07:00
iliajie
f932925b29 Fix support for Amazon Linux release 2023 OS [build] 2023-08-06 15:45:57 +03:00
34 changed files with 3599 additions and 89 deletions

View File

@@ -1,8 +1,15 @@
## Changelog ## Changelog
#### 2.102 (August 23, 2023)
* Add support for Amazon Linux 2023
* Fix a bug in Network Configuration module when parsing network size [sourceforge.net/discussion#55377]( https://sourceforge.net/p/webadmin/discussion/55377/thread/78e5aa05f3)
* Fix Netplan related bugs in Network Configuration module
* Fix Terminal focus bug
* Fix to correctly compare Webmin semantic versions
* Fix to suppress output from `monitor.pl` command [#1984](https://github.com/webmin/webmin/issues/1984)
#### 2.101 (August 5, 2023) #### 2.101 (August 5, 2023)
* Add support for reading gzipped email messages * Add support for reading gzipped email messages
* Add support for Amazon Linux 2023
* Add `error_stderr` API * Add `error_stderr` API
* Fix to show correct locale for sudo-capable users [webmin/authentic-theme#1663](https://github.com/webmin/authentic-theme/issues/1663) * Fix to show correct locale for sudo-capable users [webmin/authentic-theme#1663](https://github.com/webmin/authentic-theme/issues/1663)
* Fix new signing key import on Debian and derivatives * Fix new signing key import on Debian and derivatives

View File

@@ -5,7 +5,7 @@ mime_types=/etc/apache2/mime.types
httpd_path=/usr/sbin/httpd httpd_path=/usr/sbin/httpd
start_cmd=systemctl start apache2 start_cmd=systemctl start apache2
stop_cmd=systemctl stop apache2 stop_cmd=systemctl stop apache2
apply_cmd=systemctl restart apache2 apply_cmd=systemctl reload apache2
show_order=0 show_order=0
max_servers=100 max_servers=100
test_config=1 test_config=1

View File

@@ -2,7 +2,7 @@
# Returns a list of files and directories under some directory # Returns a list of files and directories under some directory
$trust_unknown_referers = 1; $trust_unknown_referers = 1;
BEGIN { require './bacula-backup-lib.pl'; } require './bacula-backup-lib.pl';
&ReadParse(); &ReadParse();
# Input sanitization # Input sanitization

View File

@@ -3591,7 +3591,7 @@ for(my $i=$#recs; $i>=0; $i--) {
if ($recs[$i]->{'type'} eq 'NSEC' || if ($recs[$i]->{'type'} eq 'NSEC' ||
$recs[$i]->{'type'} eq 'NSEC3' || $recs[$i]->{'type'} eq 'NSEC3' ||
$recs[$i]->{'type'} eq 'RRSIG' || $recs[$i]->{'type'} eq 'RRSIG' ||
$recs[$i]->{'type'} eq 'NSEC3PARAM' && $tools || $recs[$i]->{'type'} eq 'NSEC3PARAM' ||
$recs[$i]->{'type'} eq 'DNSKEY') { $recs[$i]->{'type'} eq 'DNSKEY') {
&delete_record($fn, $recs[$i]); &delete_record($fn, $recs[$i]);
} }

View File

@@ -233,25 +233,32 @@ print "<p><b>$text{'do_done'}</b><p>\n";
# Show details of installed packages, where we have them # Show details of installed packages, where we have them
for($i=0; $i<@names; $i++) { for($i=0; $i<@names; $i++) {
next if (!$pinfo[$i]); next if (!$pinfo[$i]);
print "<table border width=100%>\n"; print &ui_table_start($text{'do_details'}, "width=100%", 4);
print "<tr $tb> <td><b>$text{'do_details'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";
if ($pinfo[$i]->[2]) { if ($pinfo[$i]->[2]) {
print "<tr> <td valign=top width=20%><b>$text{'do_desc'}</b></td>\n"; print &ui_table_row($text{'do_desc'},
print "<td colspan=3><pre>$pinfo[$i]->[2]</pre></td> </tr>\n"; "<pre>".&html_escape($pinfo[$i]->[2])."</pre>", 3);
} }
print "<tr> <td width=20%><b>$text{'do_pack'}</b></td> <td>$pinfo[$i]->[0]</td>\n"; print &ui_table_row($text{'do_pack'},
print "<td width=20%><b>$text{'do_class'}</b></td> <td>", $pinfo[$i]->[0]);
$pinfo[$i]->[1] ? $pinfo[$i]->[1] : $text{'do_none'},"</td> </tr>\n";
print "<tr> <td width=20%><b>$text{'do_ver'}</b></td> <td>$pinfo[$i]->[4]</td>\n"; print &ui_table_row($text{'do_class'},
print "<td width=20%><b>$text{'do_vend'}</b></td> <td>$pinfo[$i]->[5]</td> </tr>\n"; $pinfo[$i]->[1] || $text{'do_none'});
print "<tr> <td width=20%><b>$text{'do_arch'}</b></td> <td>$pinfo[$i]->[3]</td>\n"; print &ui_table_row($text{'do_ver'},
print "<td width=20%><b>$text{'do_inst'}</b></td> <td>$pinfo[$i]->[6]</td> </tr>\n"; $pinfo[$i]->[4]);
print "</table></td></tr></table><p>\n";
print &ui_table_row($text{'do_vend'},
$pinfo[$i]->[5]);
print &ui_table_row($text{'do_arch'},
$pinfo[$i]->[3]);
print &ui_table_row($text{'do_inst'},
$pinfo[$i]->[6]);
print &ui_table_end();
} }
&remote_finished(); &remote_finished();

View File

@@ -22,10 +22,12 @@ else {
if ($in{source} == 0) { if ($in{source} == 0) {
# installing from local file (or maybe directory) # installing from local file (or maybe directory)
if (!$in{'local'}) if (!$in{'local'}) {
{ &install_error($text{'install_elocal'}); } &install_error($text{'install_elocal'});
if (!-r $in{'local'}) }
{ &install_error(&text('install_elocal2', $in{'local'})); } if (!-r $in{'local'}) {
&install_error(&text('install_elocal2', &html_escape($in{'local'})));
}
$source = $in{'local'}; $source = $in{'local'};
$pfile = $in{'local'}; $pfile = $in{'local'};
$filename = $in{'local'}; $filename = $in{'local'};

View File

@@ -29,7 +29,7 @@ if (@match == 1) {
&ui_print_header(undef, $text{'search_title'}, "", "search"); &ui_print_header(undef, $text{'search_title'}, "", "search");
if (@match) { if (@match) {
@match = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @match; @match = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @match;
print "<b>",&text('search_match', "<tt>$s</tt>"),"</b><br>\n"; print "<b>",&text('search_match', "<tt>".&html_escape($s)."</tt>"),"</b><br>\n";
print &ui_form_start("delete_packs.cgi", "post"); print &ui_form_start("delete_packs.cgi", "post");
print &ui_hidden("search", $in{'search'}),"\n"; print &ui_hidden("search", $in{'search'}),"\n";
@@ -43,8 +43,8 @@ if (@match) {
$text{'search_desc'} ], 100, 0, \@tds); $text{'search_desc'} ], 100, 0, \@tds);
foreach $i (@match) { foreach $i (@match) {
local @cols; local @cols;
push(@cols, "<a href=\"edit_pack.cgi?search=$s&package=". push(@cols, "<a href=\"edit_pack.cgi?search=".&urlize($s).
&urlize($i->{'name'})."\">$i->{'name'}</a>"); "&package=".&urlize($i->{'name'})."\">$i->{'name'}</a>");
$c = $i->{'class'}; $c = $i->{'class'};
push(@cols, $i->{'class'} || $text{'search_none'}); push(@cols, $i->{'class'} || $text{'search_none'});
push(@cols, $i->{'desc'}); push(@cols, $i->{'desc'});
@@ -62,7 +62,7 @@ if (@match) {
print &ui_form_end(); print &ui_form_end();
} }
else { else {
print "<b>",&text('search_nomatch', "<tt>$s</tt>"),"</b>\n"; print "<b>",&text('search_nomatch', "<tt>".&html_escape($s)."</tt>"),"</b>\n";
} }
&ui_print_footer("", $text{'index_return'}); &ui_print_footer("", $text{'index_return'});

View File

@@ -16,10 +16,12 @@ else {
if ($in{source} == 0) { if ($in{source} == 0) {
# installing from local file (or maybe directory) # installing from local file (or maybe directory)
if (!$in{'local'}) if (!$in{'local'}) {
{ &download_error($text{'install_elocal'}); } &download_error($text{'install_elocal'});
if (!-r $in{'local'}) }
{ &download_error(&text('install_elocal2', $in{'local'})); } if (!-r $in{'local'}) {
&download_error(&text('install_elocal2', &html_escape($in{'local'})));
}
$source = $in{'local'}; $source = $in{'local'};
$pfile = $in{'local'}; $pfile = $in{'local'};
$need_unlink = 0; $need_unlink = 0;
@@ -55,7 +57,9 @@ elsif ($in{source} == 2) {
&ftp_download($host, $file, $pfile, \$error, &ftp_download($host, $file, $pfile, \$error,
\&progress_callback); \&progress_callback);
} }
else { &download_error(&text('install_eurl', $in{'url'})); } else {
&download_error(&text('install_eurl', &html_escape($in{'url'})));
}
&download_error($error) if ($error); &download_error($error) if ($error);
$source = $in{'url'}; $source = $in{'url'};
$need_unlink = 1; $need_unlink = 1;

View File

@@ -16,10 +16,12 @@ else {
if ($in{source} == 0) { if ($in{source} == 0) {
# installing from local file (or maybe directory) # installing from local file (or maybe directory)
if (!$in{'local'}) if (!$in{'local'}) {
{ &download_error($text{'install_elocal'}); } &download_error($text{'install_elocal'});
if (!-r $in{'local'}) }
{ &download_error(&text('install_elocal2', $in{'local'})); } if (!-r $in{'local'}) {
&download_error(&text('install_elocal2', &html_escape($in{'local'})));
}
$source = $in{'local'}; $source = $in{'local'};
$pfile = $in{'local'}; $pfile = $in{'local'};
$need_unlink = 0; $need_unlink = 0;
@@ -55,7 +57,9 @@ elsif ($in{source} == 2) {
&ftp_download($host, $file, $pfile, \$error, &ftp_download($host, $file, $pfile, \$error,
\&progress_callback); \&progress_callback);
} }
else { &download_error(&text('install_eurl', $in{'url'})); } else {
&download_error(&text('install_eurl', &html_escape($in{'url'})));
}
&download_error($error) if ($error); &download_error($error) if ($error);
$source = $in{'url'}; $source = $in{'url'};
$need_unlink = 1; $need_unlink = 1;

View File

@@ -1603,6 +1603,7 @@ if ($config{'system_crontab'}) {
} }
if ($config{'cronfiles_dir'}) { if ($config{'cronfiles_dir'}) {
push(@files, glob(&translate_filename($config{'cronfiles_dir'})."/*")); push(@files, glob(&translate_filename($config{'cronfiles_dir'})."/*"));
@files = grep { -f $_ } @files;
} }
return &unique(@files); return &unique(@files);
} }

View File

@@ -49,6 +49,10 @@ if (&no_user_procmailrc()) {
} }
@filters = &list_filters(); @filters = &list_filters();
foreach my $filter (@filters) {
$filter->{'action'} = &html_escape($filter->{'action'})
if ($filter->{'action'});
}
@links = ( ); @links = ( );
if (@filters) { if (@filters) {
push(@links, &select_all_link("d"), &select_invert_link("d")); push(@links, &select_all_link("d"), &select_invert_link("d"));
@@ -116,7 +120,7 @@ if (@filters || &get_global_spamassassin()) {
# Work out nice condition and action descriptions # Work out nice condition and action descriptions
local $cond; local $cond;
($cond, $lastalways) = &describe_condition($f); ($cond, $lastalways) = &describe_condition($f);
$cond = &ui_link("edit.cgi?idx=$f->{'index'}",$cond); $cond = &ui_link("edit.cgi?idx=$f->{'index'}", &html_escape($cond));
local $action = &describe_action($f, \@folders); local $action = &describe_action($f, \@folders);
# Create mover links # Create mover links

View File

@@ -501,18 +501,7 @@ return $? ? $out : undef;
sub get_config_files sub get_config_files
{ {
my $conf_dir = $config{'config_dir'} || '/etc/firewalld'; my $conf_dir = $config{'config_dir'} || '/etc/firewalld';
my @conf_files; return (glob("$conf_dir/*.xml"), glob("$conf_dir/*/*.xml"));
my @dirpath = ($conf_dir);
eval "use File::Find;";
if (!$@) {
find(sub {
my $file = $File::Find::name;
push(@conf_files, $file)
if (-f $file && $file =~ /\.(conf|xml)$/);
}, @dirpath);
}
push(@conf_files, "$conf_dir/direct.xml");
return @conf_files;
} }
1; 1;

View File

@@ -151,7 +151,7 @@ if ($config{'log_read'}) {
sub show_arrows sub show_arrows
{ {
my $link = "list_mail.cgi?user=".&urlize($in{'user'})."&folder=".$in{'folder'}; my $link = "list_mail.cgi?user=".&urlize($in{'user'})."&folder=".&urlize($in{'folder'});
my $left = $in{'start'} ? my $left = $in{'start'} ?
$link."&start=".($in{'start'}-$perpage) : undef; $link."&start=".($in{'start'}-$perpage) : undef;
my $right = $in{'start'}+$perpage < @mail ? my $right = $in{'start'}+$perpage < @mail ?

View File

@@ -458,7 +458,6 @@ foreach my $deb ("deb", "newkey/deb") {
# Run the actual build command # Run the actual build command
system("fakeroot dpkg --build $tmp_dir $deb/${product}_${ver}${rel}_all.deb") && system("fakeroot dpkg --build $tmp_dir $deb/${product}_${ver}${rel}_all.deb") &&
die "dpkg failed"; die "dpkg failed";
#system("rm -rf $tmp_dir");
print "Wrote $deb/${product}_${ver}${rel}_all.deb\n"; print "Wrote $deb/${product}_${ver}${rel}_all.deb\n";
$md5 = `md5sum $tarfile`; $md5 = `md5sum $tarfile`;
$md5 =~ s/\s+.*\n//g; $md5 =~ s/\s+.*\n//g;
@@ -521,6 +520,8 @@ EOF
unlink("sigs/${product}_${ver}${rel}_all.deb-sig.asc"); unlink("sigs/${product}_${ver}${rel}_all.deb-sig.asc");
system("gpg --armor --output sigs/${product}_${ver}${rel}_all.deb-sig.asc --default-key $key --detach-sig $deb/${product}_${ver}${rel}_all.deb"); system("gpg --armor --output sigs/${product}_${ver}${rel}_all.deb-sig.asc --default-key $key --detach-sig $deb/${product}_${ver}${rel}_all.deb");
print "Wrote sigs/${product}_${ver}${rel}_all.deb-sig.asc\n"; print "Wrote sigs/${product}_${ver}${rel}_all.deb-sig.asc\n";
system("rm -rf $diff_orig_dir $diff_new_dir");
} }
# read_file(file, &assoc, [&order], [lowercase]) # read_file(file, &assoc, [&order], [lowercase])

View File

@@ -1450,7 +1450,10 @@ alarm(0);
# If a remote IP is given in a header (such as via a proxy), only use it # If a remote IP is given in a header (such as via a proxy), only use it
# for logging unless trust_real_ip is set # for logging unless trust_real_ip is set
local $headerhost = $header{'x-forwarded-for'} || local $headerhost = $header{'x-forwarded-for'} ||
$header{'x-real-ip'}; $header{'x-real-ip'} ||
$header{'true-client-ip'} ||
$header{'cf-connecting-ip'} ||
$header{'cf-connecting-ip6'};
if ($headerhost) { if ($headerhost) {
# Only real IPs are allowed # Only real IPs are allowed
$headerhost = undef if (!&check_ipaddress($headerhost) && $headerhost = undef if (!&check_ipaddress($headerhost) &&
@@ -1687,12 +1690,15 @@ if ($header{'user-agent'} =~ /webmin/i ||
} }
# Check for SSL authentication # Check for SSL authentication
if ($use_ssl && $verified_client) { if ($use_ssl && $verified_client ||
$peername = Net::SSLeay::X509_NAME_oneline( $config{'trust_real_ip'} && $header{'x-ssl-client-dn'}) {
Net::SSLeay::X509_get_subject_name( if ($use_ssl && $verified_client) {
Net::SSLeay::get_peer_certificate( $peername = Net::SSLeay::X509_NAME_oneline(
$ssl_con))); Net::SSLeay::X509_get_subject_name(
$u = &find_user_by_cert($peername); Net::SSLeay::get_peer_certificate(
$ssl_con)));
$u = &find_user_by_cert($peername);
}
if ($config{'trust_real_ip'} && !$u && $header{'x-ssl-client-dn'}) { if ($config{'trust_real_ip'} && !$u && $header{'x-ssl-client-dn'}) {
# Use proxied client cert # Use proxied client cert
$u = &find_user_by_cert($header{'x-ssl-client-dn'}); $u = &find_user_by_cert($header{'x-ssl-client-dn'});
@@ -1701,7 +1707,7 @@ if ($use_ssl && $verified_client) {
$authuser = $u; $authuser = $u;
$validated = 2; $validated = 2;
} }
if ($use_syslog && !$validated) { if ($use_syslog && !$validated && $use_ssl && $verified_client) {
syslog("crit", "%s", syslog("crit", "%s",
"Unknown SSL certificate $peername"); "Unknown SSL certificate $peername");
} }

View File

@@ -4,7 +4,7 @@ require 'mysql-lib.pl';
sub module_install sub module_install
{ {
my $mysql_version = &get_mysql_version(); my $mysql_version = &get_mysql_version();
if ($mysql_version > 0) { if ($mysql_version && $mysql_version >= 0) {
&save_mysql_version($mysql_version); &save_mysql_version($mysql_version);
&create_module_info_overrides(); &create_module_info_overrides();
} }

View File

@@ -57,7 +57,7 @@ if (&has_command("ip")) {
$ifc{'address'} = $1; $ifc{'address'} = $1;
$ifc{'netmask'} = &prefix_to_mask("$3"); $ifc{'netmask'} = &prefix_to_mask("$3");
} }
elsif ($l =~ /\sinet\s+([0-9\.]+)\/\d+\s+(?:metric\s+\d+\s+|)brd\s+(\S+)\s+scope\s+global(?:\s+secondary|)\s(dynamic)\s+.*?(\Q$iface_name\E)/) { elsif ($l =~ /\sinet\s+([0-9\.]+)\/(\d+)\s+(?:metric\s+\d+\s+|)brd\s+(\S+)\s+scope\s+global(?:\s+secondary|)\s(dynamic)\s+.*?(\Q$iface_name\E)/) {
# Line like : # Line like :
# inet 193.9.101.120/24 brd 193.9.101.255 scope global secondary dynamic br0 # inet 193.9.101.120/24 brd 193.9.101.255 scope global secondary dynamic br0
# inet 10.211.55.81/24 metric 100 brd 10.211.55.255 scope global secondary dynamic enp0s5 # inet 10.211.55.81/24 metric 100 brd 10.211.55.255 scope global secondary dynamic enp0s5
@@ -525,7 +525,7 @@ return &has_command("ifup") &&
$gconfig{'os_version'} >= 5 || $gconfig{'os_version'} >= 5 ||
$gconfig{'os_type'} eq 'redhat-linux' && $gconfig{'os_type'} eq 'redhat-linux' &&
$gconfig{'os_version'} >= 13) && $gconfig{'os_version'} >= 13) &&
($iface->{'name'} !~ /^(eth|em|eno|ens|enp|enx|lo|br)/ || ($iface->{'name'} !~ /^(eth|em|eno|ens|enp|enx|enX|lo|br)/ ||
$iface->{'name'} =~ /^(\S+)\.(\d+)/) && $iface->{'name'} =~ /^(\S+)\.(\d+)/) &&
$iface->{'virtual'} eq ''; $iface->{'virtual'} eq '';
} }
@@ -541,7 +541,7 @@ if ($name =~ /^(.*)\.(\d+)$/) {
return "PPP" if ($name =~ /^ppp/); return "PPP" if ($name =~ /^ppp/);
return "SLIP" if ($name =~ /^sl/); return "SLIP" if ($name =~ /^sl/);
return "PLIP" if ($name =~ /^plip/); return "PLIP" if ($name =~ /^plip/);
return "Ethernet" if ($name =~ /^eth|em|eno|ens|enp|enx|p\d+p\d+|vtnet/); return "Ethernet" if ($name =~ /^eth|em|eno|ens|enp|enx|enX|p\d+p\d+|vtnet/);
return "Wireless Ethernet" if ($name =~ /^(wlan|ath)/); return "Wireless Ethernet" if ($name =~ /^(wlan|ath)/);
return "Arcnet" if ($name =~ /^arc/); return "Arcnet" if ($name =~ /^arc/);
return "Token Ring" if ($name =~ /^tr/); return "Token Ring" if ($name =~ /^tr/);
@@ -803,7 +803,7 @@ return $? ? $out : undef;
# Does some interface have an editable hardware address # Does some interface have an editable hardware address
sub iface_hardware sub iface_hardware
{ {
return $_[0] =~ /^(eth|em|eno|ens|enp|enx)/; return $_[0] =~ /^(eth|em|eno|ens|enp|enx|enX)/;
} }
# allow_interface_clash() # allow_interface_clash()

View File

@@ -200,7 +200,7 @@ else {
if ($iface->{'dhcp'}) { if ($iface->{'dhcp'}) {
push(@lines, $id." "."dhcp4: true"); push(@lines, $id." "."dhcp4: true");
} }
else { elsif ($iface->{'address'}) {
push(@addrs, $iface->{'address'}."/". push(@addrs, $iface->{'address'}."/".
&mask_to_prefix($iface->{'netmask'})); &mask_to_prefix($iface->{'netmask'}));
} }

View File

@@ -88,7 +88,7 @@ Amazon Linux $1 redhat-linux 20.0 `cat /etc/system-release 2>/dev/null` =~ /Am
Amazon Linux $1 redhat-linux 15.0 `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+(2)\n/ || `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+release\s+(2)\s/ Amazon Linux $1 redhat-linux 15.0 `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+(2)\n/ || `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+release\s+(2)\s/
# Amazon Linux (3, approximately based on Fedora) # Amazon Linux (3, approximately based on Fedora)
Amazon Linux $1 redhat-linux 34.0 `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+([\d+]{4})/ Amazon Linux $1 redhat-linux 34.0 `cat /etc/system-release 2>/dev/null` =~ /Amazon\s+Linux\s+release\s+([\d+]{4})/i
# Free Redhat Linux and Fedora # Free Redhat Linux and Fedora
Redhat Linux $1 redhat-linux $1 `cat /etc/redhat-release 2>/dev/null` =~ /red.*hat.*release\s+(\S+)/i && `cat /etc/redhat-release 2>/dev/null` !~ /[eE]nterprise|AS|ES|WS|[aA]dvanced/ Redhat Linux $1 redhat-linux $1 `cat /etc/redhat-release 2>/dev/null` =~ /red.*hat.*release\s+(\S+)/i && `cat /etc/redhat-release 2>/dev/null` !~ /[eE]nterprise|AS|ES|WS|[aA]dvanced/

View File

@@ -13,7 +13,8 @@ $in{'file'} ||= $files[0];
print &ui_form_start("manual.cgi"); print &ui_form_start("manual.cgi");
print "<b>$text{'cmanual_file'}</b>\n"; print "<b>$text{'cmanual_file'}</b>\n";
print &ui_select("file", $in{'file'}, print &ui_select("file", $in{'file'},
[ map { [ $_ ] } @files ]),"\n"; [ grep { [ $_ ] if (!-d $_) }
@files ]),"\n";
print &ui_submit($text{'cmanual_ok'}); print &ui_submit($text{'cmanual_ok'});
print &ui_form_end(); print &ui_form_end();

View File

@@ -93,7 +93,8 @@ fi
# Ask first # Ask first
if [ "$1" != "-f" ] && [ "$1" != "--force" ]; then if [ "$1" != "-f" ] && [ "$1" != "--force" ]; then
printf "\e[47;1;31;82mNightly builds are experimental and unstable versions used for testing\nand development purposes, may have critical bugs and breaking changes!\e[0m\n" printf "\e[47;1;31;82mNightly builds are experimental and unstable versions used for testing\e[0m\n"
printf "\e[47;1;31;82mand development purposes, may have critical bugs and breaking changes!\e[0m\n"
printf "Setup development repository? (y/N) " printf "Setup development repository? (y/N) "
read -r sslyn read -r sslyn

View File

@@ -20,6 +20,7 @@ local $force = !$_[2];
local (@rv, @newpacks); local (@rv, @newpacks);
# Build the command to run # Build the command to run
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive'; $ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
local $uicmd = "$apt_get_command -y ".($force ? " -f" : "")." install $update"; local $uicmd = "$apt_get_command -y ".($force ? " -f" : "")." install $update";
$update = join(" ", map { quotemeta($_) } split(/\s+/, $update)); $update = join(" ", map { quotemeta($_) } split(/\s+/, $update));
@@ -75,6 +76,7 @@ return @rv;
sub update_system_operations sub update_system_operations
{ {
my ($packages) = @_; my ($packages) = @_;
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive'; $ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
my $cmd = "apt-get -s install ". my $cmd = "apt-get -s install ".
join(" ", map { quotemeta($_) } split(/\s+/, $packages)). join(" ", map { quotemeta($_) } split(/\s+/, $packages)).

View File

@@ -202,6 +202,7 @@ local $args = ($in->{'depends'} ? " --force-depends" : "").
($in->{'overwrite'} ? " --force-overwrite" : ""). ($in->{'overwrite'} ? " --force-overwrite" : "").
($in->{'downgrade'} ? " --force-downgrade" : ""); ($in->{'downgrade'} ? " --force-downgrade" : "");
local $qm = quotemeta($_[0]); local $qm = quotemeta($_[0]);
$ENV{'UCF_FORCE_CONFFOLD'} = 'YES';
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive'; $ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
local $out = &backquote_logged("dpkg --install $args $qm 2>&1 </dev/null"); local $out = &backquote_logged("dpkg --install $args $qm 2>&1 </dev/null");
if ($?) { if ($?) {

View File

@@ -0,0 +1,13 @@
local_cf=/etc/spamassassin/local.cf
spamassassin=spamassassin
sa_learn=sa-learn
procmailrc=/etc/procmailrc
amavisdconf=/etc/amavis/conf.d/20-debian_defaults
warn_procmail=1
call_spam=1
processes=spamd amavisd
restart_cmd=systemctl restart spamassassin
procmail_cmd=*
mode=0
addto=0
max_awl=200

View File

@@ -0,0 +1,13 @@
local_cf=/etc/spamassassin/local.cf
spamassassin=spamassassin
sa_learn=sa-learn
procmailrc=/etc/procmailrc
amavisdconf=/etc/amavis/conf.d/20-debian_defaults
warn_procmail=1
call_spam=1
processes=spamd amavisd
restart_cmd=systemctl restart spamd
procmail_cmd=*
mode=0
addto=0
max_awl=200

View File

@@ -9,6 +9,7 @@ use Socket;
# Wrapper command for cron job # Wrapper command for cron job
$cron_cmd = "$module_config_directory/monitor.pl"; $cron_cmd = "$module_config_directory/monitor.pl";
$full_cron_cmd = $cron_cmd." >/dev/null 2>&1";
# Config directory for monitors # Config directory for monitors
$services_dir = "$module_config_directory/services"; $services_dir = "$module_config_directory/services";
@@ -297,7 +298,9 @@ sub setup_cron_job
&foreign_require("cron"); &foreign_require("cron");
my $job; my $job;
foreach my $j (&cron::list_cron_jobs()) { foreach my $j (&cron::list_cron_jobs()) {
$job = $j if ($j->{'user'} eq 'root' && $j->{'command'} eq $cron_cmd); $job = $j if ($j->{'user'} eq 'root' &&
($j->{'command'} eq $cron_cmd ||
$j->{'command'} eq $full_cron_cmd));
} }
if ($job) { if ($job) {
&lock_file(&cron::cron_file($job)); &lock_file(&cron::cron_file($job));
@@ -314,7 +317,7 @@ if ($config{'sched_mode'}) {
$njob = { 'user' => 'root', 'active' => 1, $njob = { 'user' => 'root', 'active' => 1,
'hours' => '*', 'days' => '*', 'hours' => '*', 'days' => '*',
'months' => '*', 'weekdays' => '*', 'months' => '*', 'weekdays' => '*',
'command' => $cron_cmd }; 'command' => $full_cron_cmd };
if ($config{'sched_period'} == 0) { if ($config{'sched_period'} == 0) {
$njob->{'mins'} = &make_interval(60); $njob->{'mins'} = &make_interval(60);
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
2.101 2.102

View File

@@ -1698,7 +1698,9 @@ $err_caller = "$stack[1]->[1] (line $stack[1]->[2])"
if ($stack[1]->[1] && $stack[1]->[2]); if ($stack[1]->[1] && $stack[1]->[2]);
if ($err_caller) { if ($err_caller) {
$err_caller =~ s/$root_directory\///; $err_caller =~ s/$root_directory\///;
my $err_caller_ = &ui_help($err_caller); my $err_caller_ =
$main::webmin_script_type =~ /^(cmd|cron)$/ ?
$err_caller : &ui_help($err_caller);
$msg = $msg ? "$msg $err_caller_" : $err_caller_; $msg = $msg ? "$msg $err_caller_" : $err_caller_;
push(@msg, $err_caller_); push(@msg, $err_caller_);
} }
@@ -4327,8 +4329,8 @@ if (!$main::get_system_hostname[$m]) {
if ($fromfile && ($m || $fromfile =~ /\./)) { if ($fromfile && ($m || $fromfile =~ /\./)) {
if ($m) { if ($m) {
$fromfile =~ s/\..*$//; $fromfile =~ s/\..*$//;
$main::get_system_hostname[$m] = $fromfile;
} }
$main::get_system_hostname[$m] = $fromfile;
return $fromfile; return $fromfile;
} }
@@ -7226,7 +7228,9 @@ if (!$@) {
# Print on screen # Print on screen
else { else {
my $dumped_data = Dumper($objref); my $dumped_data = Dumper($objref);
if ($filename ne '0') { # If print to UI, escape HTML and
# replace new lines and spaces
if ($main::webmin_script_type eq 'web') {
$dumped_data = &html_escape($dumped_data); $dumped_data = &html_escape($dumped_data);
$dumped_data =~ s/\n/<br>/g; $dumped_data =~ s/\n/<br>/g;
$dumped_data =~ s/\s/&nbsp;/g; $dumped_data =~ s/\s/&nbsp;/g;
@@ -8842,15 +8846,24 @@ if ($ssl) {
{ {
my $cert = Net::SSLeay::X509_STORE_CTX_get_current_cert($_[1]); my $cert = Net::SSLeay::X509_STORE_CTX_get_current_cert($_[1]);
if ($cert) { if ($cert) {
my $subject = Net::SSLeay::X509_NAME_oneline(
Net::SSLeay::X509_get_subject_name($cert));
my $issuer = Net::SSLeay::X509_NAME_oneline(
Net::SSLeay::X509_get_issuer_name($cert));
my $errnum = Net::SSLeay::X509_STORE_CTX_get_error($_[1]); my $errnum = Net::SSLeay::X509_STORE_CTX_get_error($_[1]);
if ($errnum) { if ($errnum) {
$main::last_set_verify_err = my $error_string = "";
"Certificate is signed by an ". eval {
"unknown CA : $issuer (code $errnum)"; $error_string = Net::SSLeay::X509_verify_cert_error_string($errnum);
$error_string = " $error_string"
if ($error_string);
};
if ($error_string) {
$main::last_set_verify_err = $error_string;
}
else {
my $issuer = Net::SSLeay::X509_NAME_oneline(
Net::SSLeay::X509_get_issuer_name($cert));
$main::last_set_verify_err =
"Certificate is signed by an ".
"unknown CA : $issuer (code $errnum)";
}
} }
else { else {
$main::last_set_verify_err = undef; $main::last_set_verify_err = undef;

View File

@@ -44,11 +44,7 @@ foreach my $repo ($webmin_apt_repo_file, $global_apt_repo_file) {
} }
}; };
foreach my $l (@$lref) { foreach my $l (@$lref) {
if ($l =~ /^\s*deb\s+((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) { if ($l =~ /^\s*deb\s+.*?((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) {
$l = &$lreffix("deb $webmin_apt_repo_url stable contrib");
$fixed++;
}
elsif ($l =~ /^\s*deb\s+\[signed-by=(\S+)\]\s+((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) {
$l = &$lreffix("deb [signed-by=$webmin_apt_repo_key] $webmin_apt_repo_url stable contrib"); $l = &$lreffix("deb [signed-by=$webmin_apt_repo_key] $webmin_apt_repo_url stable contrib");
$fixed++; $fixed++;
} }

View File

@@ -116,8 +116,8 @@ foreach my $a (@ann) {
next if ($a->{'skip_cloudmin_pro'} && $cmpro); next if ($a->{'skip_cloudmin_pro'} && $cmpro);
next if ($a->{'skip_cloudmin_gpl'} && %cminfo && !$cmpro); next if ($a->{'skip_cloudmin_gpl'} && %cminfo && !$cmpro);
next if ($a->{'skip_pro'} && ($vmpro || $cmpro)); next if ($a->{'skip_pro'} && ($vmpro || $cmpro));
next if ($a->{'atleast_version'} && $ver < $a->{'atleast_version'}); next if ($a->{'atleast_version'} && &compare_version_numbers($ver, '<', $a->{'atleast_version'}));
next if ($a->{'atmost_version'} && $ver > $a->{'atmost_version'}); next if ($a->{'atmost_version'} && &compare_version_numbers($ver, '>', $a->{'atmost_version'}));
next if ($a->{'user_types'} && $a->{'user_types'} !~ /\Q$utype\E/); next if ($a->{'user_types'} && $a->{'user_types'} !~ /\Q$utype\E/);
next if ($a->{'beta'} && !$gconfig{'beta_announce'}); next if ($a->{'beta'} && !$gconfig{'beta_announce'});
next if ($a->{'depends'} && !&foreign_check($a->{'depends'})); next if ($a->{'depends'} && !&foreign_check($a->{'depends'}));

View File

@@ -1340,7 +1340,7 @@ foreach my $repo ($webmin_apt_repo_file, $global_apt_repo_file) {
next if (!-r $repo); next if (!-r $repo);
my $lref = &read_file_lines($repo, 1); my $lref = &read_file_lines($repo, 1);
foreach my $l (@$lref) { foreach my $l (@$lref) {
if ($l =~ /^\s*deb\s+.*((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) { if ($l =~ /^\s*deb\s+.*?((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) {
$repoerr = &text('notify_aptrepo', $repoerr = &text('notify_aptrepo',
$webmin_apt_repo_url); $webmin_apt_repo_url);
last; last;

View File

@@ -243,7 +243,7 @@ my $term_script = <<EOF;
term.loadAddon(fitAddon); term.loadAddon(fitAddon);
term.loadAddon(rendererAddon); term.loadAddon(rendererAddon);
term.open(termcont); term.open(termcont);
term.focus(); setTimeout(function() {term.focus()}, 6e2);
// Handle case of dropping WebGL context // Handle case of dropping WebGL context
if (typeof WebglAddon === 'object') { if (typeof WebglAddon === 'object') {