enumerateUsers wildcard append assumes string criteria values
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- authentication
Research direction
Start in src/pas/plugins/ldap/plugin.py around enumerateUsers and inspect how criterion values are handled before the wildcard is appended. Confirm the expected behavior for non-string values, add coverage for an integer criterion, and run the relevant test suite to verify that string criteria still receive the correct wildcard handling.
Written by the indexing model from the issue text.
Description
Found during the 2.0.0 release-readiness review (see #144).
In enumerateUsers (src/pas/plugins/ldap/plugin.py, ~line 430):
if not value.endswith("*"):
kw[key] = value + "*"
If a caller passes a non-string criterion value (e.g. an int), value.endswith raises AttributeError. In practice PAS passes strings, so the risk is low, but a str() coercion / isinstance guard would harden it.
Severity: low / hardening.
- Dominant language
- Python
- Stars
- 13
- Forks
- 22
- 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 collective/pas.plugins.ldap
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
collective/pas.plugins.ldap#149 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
collective/pas.plugins.ldap#152 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
collective/pas.plugins.ldap#147 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
collective/pas.plugins.ldap#145 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
collective/pas.plugins.ldap#125 · 1 reaction ·
All issues in collective/pas.plugins.ldap
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100