File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,9 +147,7 @@ The following SAML 2.0 options are available:
147147: - ` string ` : Will include the attribute as a normal string. This is
148148 the default.
149149
150- : - ` base64 ` : Store the attribute as a base64 encoded string. This
151- is the default when the ` base64attributes ` -option is set to
152- ` TRUE ` .
150+ : - ` base64 ` : Store the attribute as a base64 encoded string.
153151
154152: - ` raw ` : Store the attribute without any modifications. This
155153 makes it possible to include raw XML in the response.
Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ The following options can be set:
3131: Used to manipulate attributes, and limit access for each SP. See
3232 the [ authentication processing filter manual] ( simplesamlphp-authproc ) .
3333
34- ` base64attributes `
35- : Whether attributes sent to this SP should be base64 encoded. The
36- default is ` FALSE ` .
37-
3834` description `
3935: A description of this SP. Will be used by various modules when they
4036 need to show a description of the SP to the user.
@@ -104,9 +100,7 @@ The following options can be set:
104100: - ` string ` : Will include the attribute as a normal string. This is
105101 the default.
106102
107- : - ` base64 ` : Store the attribute as a base64 encoded string. This
108- is the default when the ` base64attributes ` -option is set to
109- ` TRUE ` .
103+ : - ` base64 ` : Store the attribute as a base64 encoded string.
110104
111105: - ` raw ` : Store the attribute without any modifications. This
112106 makes it possible to include raw XML in the response.
Original file line number Diff line number Diff line change @@ -974,16 +974,7 @@ private static function encodeAttributes(
974974 Configuration $ spMetadata ,
975975 array $ attributes
976976 ): array {
977- $ base64Attributes = $ spMetadata ->getOptionalBoolean ('base64attributes ' , null );
978- if ($ base64Attributes === null ) {
979- $ base64Attributes = $ idpMetadata ->getOptionalBoolean ('base64attributes ' , false );
980- }
981-
982- if ($ base64Attributes ) {
983- $ defaultEncoding = 'base64 ' ;
984- } else {
985- $ defaultEncoding = 'string ' ;
986- }
977+ $ defaultEncoding = 'string ' ;
987978
988979 $ srcEncodings = $ idpMetadata ->getOptionalArray ('attributeencodings ' , []);
989980 $ dstEncodings = $ spMetadata ->getOptionalArray ('attributeencodings ' , []);
Original file line number Diff line number Diff line change @@ -829,21 +829,6 @@ private static function processAssertion(
829829 }
830830 // as far as we can tell, the assertion is valid
831831
832- // maybe we need to base64 decode the attributes in the assertion?
833- if ($ idpMetadata ->getOptionalBoolean ('base64attributes ' , false )) {
834- $ attributes = $ assertion ->getAttributes ();
835- $ newAttributes = [];
836- foreach ($ attributes as $ name => $ values ) {
837- $ newAttributes [$ name ] = [];
838- foreach ($ values as $ value ) {
839- foreach (explode ('_ ' , $ value ) as $ v ) {
840- $ newAttributes [$ name ][] = base64_decode ($ v );
841- }
842- }
843- }
844- $ assertion ->setAttributes ($ newAttributes );
845- }
846-
847832 // decrypt the NameID element if it is encrypted
848833 if ($ assertion ->isNameIdEncrypted ()) {
849834 try {
You can’t perform that action at this time.
0 commit comments