Skip to content

Commit

Permalink
Item14674: Quiet down the AuthScripts and TempfileDir checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Apr 1, 2018
1 parent 3659382 commit 2f9b514
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions core/lib/Foswiki/Configure/Checkers/AuthScripts.pm
Expand Up @@ -11,6 +11,10 @@ sub check_current_value {
my ( $this, $reporter ) = @_;
my $msg = '';

my $notCLI =
( defined $Foswiki::cfg{Engine}
&& substr( $Foswiki::cfg{Engine}, -3 ) ne 'CLI' );

my $templateLogin = eval {
$Foswiki::cfg{LoginManager}
->isa('Foswiki::LoginManager::TemplateLogin');
Expand All @@ -25,14 +29,16 @@ other than 'none' or clear this setting.
EOF
}

unless ($templateLogin) {
$reporter->WARN(<<'EOF');
if ($notCLI) {
unless ($templateLogin) {
$reporter->WARN(<<'EOF');
You have specified an alternative (non-TemplateLogin) login manager.
It is critical that this list of scripts be consistent with the scripts
protected by the Web Server. For example, if you are using Apache then
verify that this setting is consistent with the =FilesMatch= or
=LocationMatch= directive that requires a valid user for the scripts.
EOF
}
}

unless ( $Foswiki::cfg{AuthScripts} =~ m/statistics/ ) {
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/Checkers/TempfileDir.pm
Expand Up @@ -18,7 +18,7 @@ sub check_current_value {
File::Spec->tmpdir() =~ m/^(.*)$/;
$tmpdir = $1; # untaint

$reporter->WARN( '{TempfileDir} is not set (or is set to nothing).'
$reporter->NOTE( '{TempfileDir} is not set (or is set to nothing).'
. " Temporary files will be written to: =$tmpdir=" );

$reporter->NOTE("Other possible alternatives:");
Expand Down

0 comments on commit 2f9b514

Please sign in to comment.