Cannot use the library with SimpleSAML
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- authentication
Research direction
Start in src/SAML2/Message.php around the Message constructor and trace Utils::getContainer()->generateId() through the SimpleSAML compatibility layer. Reproduce construction of a SAMLRequest from an incoming string and inspect the SimpleSAML Random dependency and Psalm suppression. Done means the library no longer crashes during this construction path.
Written by the indexing model from the issue text.
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.
- Dominant language
- PHP
- Stars
- 306
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simplesamlphp/saml2
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
simplesamlphp/saml2#408 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
simplesamlphp/saml2#397 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
simplesamlphp/saml2#360 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
simplesamlphp/saml2#345 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
simplesamlphp/saml2#309 · 18 comments ·
All issues in simplesamlphp/saml2
Similar issues
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#2161 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/static-site-importer#1824 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100