This repository was archived by the owner on Sep 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11# Change Log
22All notable changes to this project will be documented in this file.
3-
3+
44## [ Unreleased]
5+ #### Fixed
6+ - Fixed removal of filtered authnContextClassRefs in disco
57
68## [ v5.1.0]
79#### Added
@@ -371,6 +373,7 @@ when storing one Perun attribute to more SAML attribute
371373## [ v1.0.0]
372374
373375[ Unreleased ] : https://github.com/CESNET/perun-simplesamlphp-module/tree/master
376+ [ v5.1.0 ] : https://github.com/CESNET/perun-simplesamlphp-module/tree/v5.1.0
374377[ v5.0.0 ] : https://github.com/CESNET/perun-simplesamlphp-module/tree/v5.0.0
375378[ v4.1.1 ] : https://github.com/CESNET/perun-simplesamlphp-module/tree/v4.1.1
376379[ v4.1.0 ] : https://github.com/CESNET/perun-simplesamlphp-module/tree/v4.1.0
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ public function __construct(
123123 if (isset ($ state ['IdPMetadata ' ]['entityid ' ])) {
124124 $ this ->proxyIdpEntityId = $ state ['IdPMetadata ' ]['entityid ' ];
125125 }
126+ State::saveState ($ state , self ::SAML_SP_SSO );
126127 }
127128 $ e = explode ("= " , $ returnURL )[0 ];
128129 $ newReturnURL = $ e . "= " . urlencode ($ id );
@@ -457,11 +458,17 @@ public function removeAuthContextClassRefWithPrefixes(&$state)
457458 unset($ state [self ::SAML_REQUESTED_AUTHN_CONTEXT ][self ::STATE_AUTHN_CONTEXT_CLASS_REF ]);
458459 $ filteredAcrs = [];
459460 foreach ($ this ->originalAuthnContextClassRef as $ acr ) {
461+ $ acr = trim ($ acr );
462+ $ retain = true ;
460463 foreach ($ prefixes as $ prefix ) {
461- if (!(substr ($ acr , 0 , strlen ($ prefix )) === $ prefix )) {
462- array_push ($ filteredAcrs , $ acr );
464+ if (substr ($ acr , 0 , strlen ($ prefix )) === $ prefix ) {
465+ $ retain = false ;
466+ break ;
463467 }
464468 }
469+ if ($ retain ) {
470+ array_push ($ filteredAcrs , $ acr );
471+ }
465472 }
466473 if (!empty ($ filteredAcrs )) {
467474 $ state [self ::SAML_REQUESTED_AUTHN_CONTEXT ][self ::STATE_AUTHN_CONTEXT_CLASS_REF ] = $ filteredAcrs ;
You can’t perform that action at this time.
0 commit comments