`getAllowedUsers` function incorrectly rejects usernames containing the digit '0'
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 36
- Fork
- 14
- Merge trung bình
- 15 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của reddit/devvit-kit
-
Native Mobile Reddit App SupportĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
reddit/devvit-kit#10 ·
-
AccessĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
reddit/devvit-kit#9 · 2 bình luận ·
Tất cả issue của reddit/devvit-kit
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
amosblomqvist/learnharness#1141 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ranxianglei/billion-context#8319 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
tencent-connect/dsh-qqbot#148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JimLiu/open-artifact#126 ·
-
redis.expireTime() returns relative TTL seconds on live host instead of Unix timestamp secondsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100