`getAllowedUsers` function incorrectly rejects usernames containing the digit '0'
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- backend
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- TypeScript
- 星标
- 36
- 派生
- 14
- 平均合并
- 15 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
reddit/devvit-kit 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
reddit/devvit-kit#10 ·
-
Access未关闭
难度 5/5 一周以上 新手友好度 10/100
reddit/devvit-kit#9 · 2 条评论 ·
查看 reddit/devvit-kit 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
amosblomqvist/learnharness#1141 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
ranxianglei/billion-context#8319 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
tencent-connect/dsh-qqbot#148 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JimLiu/open-artifact#126 ·
-
难度 2/5 1-3 小时 新手友好度 78/100