Open
Description
When trying to generate a SAMLRequest object from an incoming string, the library crashes.
The following is from the Message constructor: https://github.com/simplesamlphp/saml2/blob/master/src/SAML2/Message.php#L143
protected function __construct(string $tagName, DOMElement $xml = null)
{
$this->tagName = $tagName;
$this->id = Utils::getContainer()->generateId();
The container is part of the compat layer with SimpleSAML. The generateId method uses the Random library from SimpleSAML
use SimpleSAML\Utils\HTTP;
use SimpleSAML\Utils\Random;
use SimpleSAML\Utils\System;
use SimpleSAML\Utils\XML;
/**
* {@inheritdoc}
* @return string
*/
public function generateId() : string
{
/** @psalm-suppress UndefinedClass */
return Random::generateID();
}
It's even marked as supressed in Psalm.
Metadata
Assignees
Labels
No labels
Activity