`getAllowedUsers` function incorrectly rejects usernames containing the digit '0'
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- typescript
- Bereich
- backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- TypeScript
- Sterne
- 36
- Forks
- 14
- Ø Merge
- 15 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus reddit/devvit-kit
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
reddit/devvit-kit#10 ·
-
AccessOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
reddit/devvit-kit#9 · 2 Kommentare ·
Alle Issues in reddit/devvit-kit
Ähnliche Issues
-
bug data-types
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: middleware enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
agent/quality testing
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
juspay/agent-distro#203 ·
Maintainer antworten meist innerhalb von 1 Tag