From d0036913eaba1fa8354d2631f106bdc3380d086e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Mon, 12 Mar 2012 22:30:51 +0000 Subject: [PATCH] Check if request is defined before calling ID (#397) --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm index 40b71d4e8..2e2829279 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm @@ -2460,6 +2460,11 @@ sub sendLogoutRequestToProvider { } + unless ( $logout->request() ) { + $self->lmLog( "Unable to create SAML request", 'error' ); + return ( 0, $method, undef ); + } + # Keep message ID in memory to prevent replay my $samlID = $logout->request()->ID; unless ( $self->storeReplayProtection($samlID) ) {