diff --git a/composer.json b/composer.json index a0d4ba5..3e16a82 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "config": { - "version": "3.18.3", + "version": "3.18.4", "allow-plugins": { "simplesamlphp/composer-module-installer": true } diff --git a/lib/ResponseHandler.php b/lib/ResponseHandler.php index 852b5f0..14c8a65 100644 --- a/lib/ResponseHandler.php +++ b/lib/ResponseHandler.php @@ -101,7 +101,7 @@ protected function makeJWS($payload, $exp_time, $iss, $aud, $jwk_pem): string { 'data' => $payload, // Authentication Data ]; - if(array_key_exists('fiscalNumber', $payload)) { // Subject - fiscalNumber, only if exists + if(is_array($payload) && array_key_exists('fiscalNumber', $payload)) { // Subject - fiscalNumber, only if exists $data['sub'] = $payload['fiscalNumber']; } @@ -119,4 +119,4 @@ protected function makeJWS($payload, $exp_time, $iss, $aud, $jwk_pem): string { return $token; } -} \ No newline at end of file +} diff --git a/setup/Setup.php b/setup/Setup.php index 16659cb..021b377 100644 --- a/setup/Setup.php +++ b/setup/Setup.php @@ -658,11 +658,11 @@ public static function setup(Event $event) { "logo"=> "/assets/img/logo.png", "client_id"=> $proxyClientID, "client_secret"=> $proxyClientSecret, - "level": 2, - "atcs_index": 0, - "handler": "Plain", - "response_attributes_prefix": "" - "redirect_uri"=> [$proxyRedirectURI] + "level" => 2, + "atcs_index" => 0, + "handler" => "Plain", + "response_attributes_prefix" => "", + "redirect_uri"=> [$proxyRedirectURI], ) ), 'signProxyResponse'=> $signProxyResponse, @@ -1725,7 +1725,7 @@ public static function remove() { * @param $config * @return array */ - private static function proxyVariables($config): array { + private static function proxyVariables($config) { return array( "{{SDKHOME}}" => $config['installDir'], "{{PROXY_CLIENT_CONFIG}}" => var_export($config['proxyConfig'], true),