Commit b9b81bd7 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Authentification Shibboleth : les attributs obligatoires requis dans ne...

Authentification Shibboleth : les attributs obligatoires requis dans  ne peuvent désormais avoir un valeur vide (null ou '').
parent 4802b8aa
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# CHANGELOG

6.5.0
-----

- Authentification Shibboleth : les attributs obligatoires requis dans $_SERVER ne peuvent désormais avoir un valeur vide (null ou ''). 


6.4.5
-----

+5 −4
Original line number Diff line number Diff line
@@ -319,19 +319,20 @@ EOS;
        $missingAttributes = [];

        foreach ($requiredAttributes as $requiredAttribute) {
            // un pipe permet d'exprimer un OU logique, ex: 'sn|surname'
            // un pipe peut avoir été utilisé pour exprimer un OU logique, ex: 'sn|surname'
            $attributes = array_map('trim', explode('|', $requiredAttribute));
            // attributs aliasés
            $attributes = $this->getAliasedShibbolethAttributes($attributes);

            $found = false;
            foreach (array_map('trim', $attributes) as $attribute) {
                if (isset($data[$attribute])) {
            foreach ($attributes as $attribute) {
                if (array_key_exists($attribute, $data) && $data[$attribute] !== null && $data[$attribute] !== '') {
                    $found = true;
                    break;
                }
            }
            if (!$found) {
                // attributs aliasés, dont l'un au moins est manquant, mise sous forme 'a|b'
                // attributs aliasés, dont l'un au moins est manquant, mis sous forme 'a|b'
                $missingAttributes[] = implode('|', $attributes);
            }
        }