moodle-auth_saml2
moodle-auth_saml2 copied to clipboard
idpmetadata with trailing spaces creating false positives
What happened?
If you have trailing spaces/extra lines in the idpmetadata field the plugin treats this as an extra (but empty) idp.
The dirty fix is adding:
On line 79 in auth.php
$this->idplist = $parser->parse(trim($this->config->idpmetadata));
Where the trim cleans up unnecessary bits before processing.
@danmarsden is this something we can push through to cleanup metadata cleanup?
sure - feel free to file a pull request - there are some other plugins that trim data from those fields before using them. - Personally I'd prefer to do it on the settings page when saving the setting rather than when using the values though.