diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Providers/CasApp.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Providers/CasApp.pm index d87d848af..f79e807db 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Providers/CasApp.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Providers/CasApp.pm @@ -309,6 +309,16 @@ sub _isNewCasAppServiceUrlUnique { my ( $self, $conf, $confKey, $casApp ) = @_; my $curServiceUrl = $self->_getCasAppByConfKey( $conf, $confKey )->{options}->{service}; + + # Check service paramater + unless ( ref $casApp->{options}->{service} eq "ARRAY" ) { + return { + res => 'ko', + code => 400, + msg => "The parameter 'service' must be an array", + }; + } + my $newService = $casApp->{options}->{service} || []; for my $newServiceUrl (@$newService) { if ( $newServiceUrl ne ''