IdPMetadata URL containing another URL
There is a case which breaks the plugin, when trying to add a new metadata url which contains a full url...
E.g. https://sso.myidpdomain.com/identity/metadata.xml?aparam=https%3A%2F%2Fsomeanotherdomain.com%2F%2Fsp%2Fmetadata.php
When trying to add the above example url as a new metadata, the following line, https://github.com/catalyst/moodle-auth_saml2/blob/MOODLE_39_STABLE/classes/idp_parser.php#L108 will further split the url into 2 parts and treating the second part as the "IdPIcon" stripping out the parameter from the metadata url.
This can potentially fail the next part where the code tries to retrieve the raw metadata. Throwing an error at this point https://github.com/catalyst/moodle-auth_saml2/blob/MOODLE_39_STABLE/classes/admin/setting_idpmetadata.php#L223