From bf3cf444fb1c606d188be0df10e6a9ca316a8f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Wed, 6 Nov 2013 16:33:26 +0000 Subject: [PATCH] Special workaround in AuthChoice for captcha (#645) --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Choice.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Choice.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Choice.pm index 34f2ecd8d..90b075daf 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Choice.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_Choice.pm @@ -8,7 +8,7 @@ package Lemonldap::NG::Portal::_Choice; use Lemonldap::NG::Portal::Simple; -our $VERSION = '1.3.0'; +our $VERSION = '1.3.1'; ## @cmethod Lemonldap::NG::Portal::_Choice new(Lemonldap::NG::Portal::Simple portal) # Constructor @@ -32,6 +32,13 @@ sub new { $portal->{_authChoice} = ""; } + # Special workaround for Captcha + # Init Captcha to have it displayed even if no choice already done + if ( $portal->{captcha_login_enabled} ) { + eval { $portal->initCaptcha(); }; + $portal->lmLog( "Can't init captcha: $@", "error" ) if $@; + } + # Special workaround for SAML # because we cannot easily set SSO return URL # and SLO URL with authChoice parameter