Skip to content

Commit

Permalink
Item12952: more badly behaved checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
crawford committed Sep 1, 2014
1 parent 22d051f commit 24b6011
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 2 additions & 3 deletions core/lib/Foswiki/Configure/Checkers/MaxLSCBackups.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ sub check_current_value {

my $lsc = Foswiki::Configure::FileUtil::findFileOnPath('LocalSite.cfg');
unless ($lsc) {
$reporter->ERROR(
'LocalSite.cfg could not be found on the path. Don\'t know where to look for backups.'
);

# Still in bootstrap mode - nothing to back up
return;
}
my ( $vol, $dir, $file ) = File::Spec->splitpath($lsc);
Expand Down
7 changes: 5 additions & 2 deletions core/lib/Foswiki/Configure/Checkers/SafeEnvPath.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ sub check_current_value {
my $pathSep = ( $Foswiki::cfg{DetailedOS} eq 'MSWin32' ) ? ';' : ':';

unless ( $Foswiki::cfg{SafeEnvPath} ) {
$reporter->WARN("You should set a value for this path.");
$reporter->NOTE(
"Without a setting of {SafeEnvPath}, the PATH used will be taken from the PATH environment variable: $ENV{PATH}"
);
return;
}

# First, get the proposed path
my @dirs = ( split( /$pathSep/o, $Foswiki::cfg{SafeEnvPath} ) );
my @dirs =
( split( /$pathSep/o, $Foswiki::cfg{SafeEnvPath} || $ENV{PATH} ) );

# Check they exist
my $found = 0;
Expand Down
2 changes: 2 additions & 0 deletions core/lib/Foswiki/Configure/Checkers/URLPATH.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ use Foswiki::Configure::Checkers::URL ();
sub check_current_value {
my ( $this, $reporter ) = @_;

return if ( $this->{item}->{UNDEFINEDOK} && !$this->getCfgUndefOk() );

$this->showExpandedValue($reporter);

my %check = ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ sub check_current_value {
my ( $this, $reporter ) = @_;
my $vuln_msg = $this->_have_vulnerable_maketext();

return unless $Foswiki::cfg{UserInterfaceInternationalisation};

if ($vuln_msg) {
if ( $Foswiki::cfg{UserInterfaceInternationalisation} ) {
$reporter->ERROR($vuln_msg);
Expand Down

0 comments on commit 24b6011

Please sign in to comment.