Only filter attributes if there is actually a list of allowed values to filter on#2095
Merged
tvdijen merged 1 commit intosimplesamlphp:simplesamlphp-2.2from May 13, 2024
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## simplesamlphp-2.2 #2095 +/- ##
====================================================
Coverage 44.83% 44.83%
- Complexity 3836 3837 +1
====================================================
Files 161 161
Lines 12824 12825 +1
====================================================
+ Hits 5749 5750 +1
Misses 7075 7075 |
tvdijen
pushed a commit
that referenced
this pull request
May 13, 2024
tvdijen
pushed a commit
that referenced
this pull request
May 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://github.com/simplesamlphp/simplesamlphp/actions/runs/9028875799/job/24810192242#step:11:19 as referenced in #1971 (comment)
The issue the warning is complaining about is handled in the first line of the
filterAttributeValues()function anyway (it handles the second argument being null), so the warning this PR fixes was harmless and condition already handled. In any case, this PR removes the noise of the warning, but should have no other impact, as the behaviour is unchanged.In the tests, the condition occurs when using SP metadata (ie.
$config = ['default' => true, ... ];), as$allowedAttributeRegexis a simple list, whereas when coming out of config files it's a key/value map.