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

オープン
#11 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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:

  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).

主要言語
TypeScript
スター
36
フォーク
14
平均マージ
15分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

reddit/devvit-kit のほかの issue

reddit/devvit-kit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。