moodle-auth_saml2 icon indicating copy to clipboard operation
moodle-auth_saml2 copied to clipboard

idpmetadata with trailing spaces creating false positives

Open dustinbrisebois opened this issue 6 years ago • 2 comments

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.

dustinbrisebois avatar Dec 13 '18 16:12 dustinbrisebois

@danmarsden is this something we can push through to cleanup metadata cleanup?

dustinbrisebois avatar Jan 28 '19 23:01 dustinbrisebois

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.

danmarsden avatar Jan 29 '19 00:01 danmarsden