Bug 17776: (QA follow-up) Consistent regex for Plack detection

Synchronizing:
C4/Auth_with_shibboleth.pm:    if ( any { /(^psgi|^plack)/i } keys %ENV ) {
Koha/AuthUtils.pm:    if ( ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) {
about.pl:if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {

Actually we should move it to a subroutine. New report please.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2018-10-05 10:25:43 +02:00 committed by Nick Clemens
parent 897711bd47
commit 7ce770ddc5
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ sub get_login_shib {
my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is};
if ( any { /(^psgi|^plack)/i } keys %ENV ) {
if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
$debug and warn $matchAttribute . " value: " . $ENV{"HTTP_".uc($matchAttribute)};
return $ENV{"HTTP_".uc($matchAttribute)} || '';
} else {