Commit 9ae1eab8 authored by Xavier Guimard's avatar Xavier Guimard

Merge branch 'fix-icon-saml-logout' into 'v2.0'

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

See merge request lemonldap-ng/lemonldap-ng!64
parents 8cd579f1 257d3291
......@@ -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