mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Don't un-comment or use cace_dir entries that are not paths https://sourceforge.net/p/webadmin/bugs/4523/
This commit is contained in:
@@ -35,8 +35,15 @@ if (!$in{'nouser'}) {
|
||||
&flush_file_lines();
|
||||
}
|
||||
|
||||
# If cache_dir is set but disabled, enable it
|
||||
# If cache_dir is set but disabled, enable it by un-commenting (but only the
|
||||
# valid directives)
|
||||
my @cachestruct = &find_config("cache_dir", $conf, 2);
|
||||
if ($squid_version >= 2.3) {
|
||||
@cachestruct = map { $_->{'values'}->[1] } @cachestruct;
|
||||
}
|
||||
else {
|
||||
@cachestruct = map { $_->{'values'}->[0] } @cachestruct;
|
||||
}
|
||||
if (@cachestruct) {
|
||||
&save_directive($conf, "cache_dir", \@cachestruct);
|
||||
&flush_file_lines();
|
||||
|
||||
@@ -454,7 +454,12 @@ foreach my $d ("cache_access_log", "access_log", "cache_log",
|
||||
# add cache directories
|
||||
if (my @str = &find_config("cache_dir", $conf)) {
|
||||
foreach my $str (@str) {
|
||||
push(@list, $str->{'values'}->[0]);
|
||||
if ($squid_version >= 2.3) {
|
||||
push(@list, $str->{'values'}->[1]);
|
||||
}
|
||||
else {
|
||||
push(@list, $str->{'values'}->[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user