Commit 257d3291 authored by Maxime Besson's avatar Maxime Besson

Fix display of ok/nok image during multi-sp saml logout

parent 8cd579f1
Pipeline #4639 passed with stage
in 9 minutes and 55 seconds
......@@ -1924,7 +1924,16 @@ sub imgnok {
sub sendImage {
my ( $self, $req,, $img ) = @_;
return $self->p->staticFile( $req, "common/$img", 'image/png' );
return [
302,
[
'Location' => $self->conf->{portal}
. $self->p->staticPrefix
. '/common/'
. $img,
],
[],
];
}
# Normalize url to be tolerant to SAML Path
......
......@@ -10,7 +10,7 @@ BEGIN {
require 't/test-lib.pm';
}
my $maintests = 15;
my $maintests = 14;
my $debug = 'error';
my ( $issuer, $sp, $res );
my %handlerOR = ( issuer => [], sp => [] );
......@@ -132,8 +132,7 @@ m#img src="http://auth.idp.com(/saml/relaySingleLogoutSOAP)\?(relay=.*?)"#s,
),
'Get image'
);
ok( getHeader( $res, 'Content-Type' ) eq 'image/png', 'Get an image' )
or explain( [ $res->[0], $res->[1] ], 'Content-Type => image/png' );
expectRedirection( $res, "http://auth.idp.com/static/common/icons/ok.png");
# Test if logout is done
switch ('issuer');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment