simplesamlphp / simplesamlphp/simplesamlphp-module-consentadmin
It breaks when regex type in `consent.disable` exists
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
When you have ['type' => 'regex', 'pattern' => '/.*\.mycompany\.com.*/i'], in consent.disable variable in config breaks the module.
The relevant line: https://github.com/simplesamlphp/simplesamlphp-module-consentadmin/blob/799cc2096c379a29fc90d1cd711e29718955a224/src/Controller/ConsentAdmin.php#L206
There is no type check for $disable variable.
// Remove services, whitch have consent disabled
if (isset($idp_metadata['consent.disable'])) {
foreach ($idp_metadata['consent.disable'] as $disable) {
if (array_key_exists($disable, $all_sp_metadata)) {
unset($all_sp_metadata[$disable]);
}
}
}
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.
Research direction
Start in src/Controller/ConsentAdmin.php at the linked line and inspect how each consent.disable entry is handled when it contains the shown regex configuration. Reproduce the failure with that configuration, then verify that the module no longer breaks and that the intended service filtering still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100