`getAllowedUsers` function incorrectly rejects usernames containing the digit '0'
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start by locating getAllowedUsers in the @devvit/kit code and tracing how it parses or validates the allowedUsers setting. Reproduce the reported case with zom-bizzle0 alongside the accepted examples. Done when usernames containing 0 are accepted without allowing unintended partial matches.
Written by the indexing model from the issue text.
Description
Issue Summary:
The getAllowedUsers function from @devvit/kit appears to have a parsing or validation issue that incorrectly rejects usernames containing the digit 0, while accepting partial usernames that don't contain 0.
(User string can only contain spaces, letters, numbers, "-", and "_")
Steps to Reproduce:
- Set the
allowedUserssetting with usernames containing0: - Test access with different usernames:
- ✅
zombizzle- Works - ✅
zombizzle2- Works - ✅
zom-bizzle3- Works - ❌
zom-bizzle0- Fails (contains0)
- ✅
Expected Behavior:
All usernames should be accepted regardless of whether they contain the digit 0.
Actual Behavior:
Usernames containing the digit 0 are rejected, while partial usernames without 0 are accepted.
Impact:
- Users with usernames containing
0cannot access admin features - Partial username matching works, suggesting a parsing issue
- Affects dev toolbar access control functionality
Workaround:
Users can work around this by using partial usernames or contacting support, but this is not ideal for production use.
Additional Notes:
This appears to be a specific issue with the getAllowedUsers function's parsing logic, as the same usernames work fine when used in other contexts (like Redis storage or direct settings access).
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 14
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 reddit/devvit-kit
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
reddit/devvit-kit#10 ·
-
AccessOpen
Difficulty 5/5 Over a week Newbie friendliness 10/100
reddit/devvit-kit#9 · 2 comments ·
All issues in reddit/devvit-kit
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
amosblomqvist/learnharness#1141 ·
Maintainers usually reply within 4 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ranxianglei/billion-context#8319 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tencent-connect/dsh-qqbot#148 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JimLiu/open-artifact#126 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100