`getAllowedUsers` function incorrectly rejects usernames containing the digit '0'

Đang mở
#11 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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:

  1. Set the allowedUsers setting with usernames containing 0:
  2. Test access with different usernames:
    • ✅ zombizzle - Works
    • ✅ zombizzle2 - Works
    • ✅ zom-bizzle3 - Works
    • ❌ zom-bizzle0 - Fails (contains 0)

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 0 cannot 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của reddit/devvit-kit

Tất cả issue của reddit/devvit-kit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.