Open 0xmerp opened 4 months ago
In advanced settings, when setting the organization name to something including a & character:
&
'organization' => array ( 'en-US' => array( 'name' => 'Name & Name2', 'displayname' => 'Name & Name2', 'url' => 'https://some-url.com' ), ),
then fetching the SP metadata:
$samlSettings = new Settings($saml_settings); $metadata = $samlSettings->getSPMetadata();
I get an error: Error parsing metadata. Error parsing metadata from Saml2/Metadata.php:
Error parsing metadata. Error parsing metadata
Saml2/Metadata.php
try { $xml = Utils::loadXML($xml, $metadata); if (!$xml) { throw new Exception('Error parsing metadata'); } } catch (Exception $e) { throw new Exception('Error parsing metadata. '.$e->getMessage()); }
Changing the & character with & fixes it, so it seems like this string wasn't being escaped properly.
&
In advanced settings, when setting the organization name to something including a
&
character:then fetching the SP metadata:
I get an error:
Error parsing metadata. Error parsing metadata
fromSaml2/Metadata.php
:Changing the
&
character with&
fixes it, so it seems like this string wasn't being escaped properly.