- πΊπΈUnited States rbrandon
Same issue, @minkahb did you find the issue before I dig through the code?
- π³π±Netherlands roderik Amsterdam,NL / Budapest,HU
The "invalid_xml" error comes from the SAML Toolkit library, which we treat as a black box. (The "Invalid SP metadata: " prefix is added in SamlService::getMetadata().)
It's Utils::validateXML() which actually does have access to more detailed errors... but it just echo/syslogs them, instead of returning them.
Maybe getMetadata() can be extended to do the same: check if $errors contains simply 'invalid_xml', and if so, add the libxml_get_errors()->messages into $errors before throwing the exception.
-
roderik β
committed 9ee7bcc3 on 8.x-3.x
Issue #3338701" for 'invalid_xml' error, log XML errors and add ?check=0...
-
roderik β
committed 9ee7bcc3 on 8.x-3.x
- Status changed to Fixed
about 1 year ago 10:36pm 26 September 2023 - π³π±Netherlands roderik Amsterdam,NL / Budapest,HU
Since I was tinkering, I added some logs. The error is now:
Invalid SP metadata: invalid_xml, detailed XML errors are logged, add ?check=0 to see the invalid metadata.
So then you can see the invalid metadata with /saml/metadata?check=0 and the errors in the Drupal log.
The only way I see to get an 'invalid_xml' error, so far, has been to add a file containing invalid text contents for the key/certificate. If this is the case, then you'll need to figure out by yourself that these contents are invalid, from seeing the XML / cryptic logged error.
But it's better than it was. So for now, I'm setting "fixed".
Automatically closed - issue fixed for 2 weeks with no activity.