Validate operation route parameters and enforce age-appropriate topics
@jd5073356-max がすでに取り組んでいます。
2026年8月19日 から。
評価
この issue はまだ評価されていません。
説明
Problem
Practice and challenge cast the raw ?op= query string to Operation without runtime validation. Visiting /game/practice?op=anything passes an unsupported value into generateQuestion(), whose switch has no default, so it returns undefined and the game crashes. Valid but age-inappropriate operations can also bypass the game hub by editing the URL.
Proposed scope
- Add a shared runtime parser/type guard for operations.
- Validate the requested operation against the active profile's age-group allowlist.
- Choose a predictable failure path: safe default with notice, or redirect to topic selection.
- Make
generateQuestion()fail explicitly for invalid input rather than returning implicitly. - Apply the same validation at every route/session entry boundary.
Acceptance criteria
- Missing, malformed, repeated, URL-encoded, and unsupported
opvalues never crash rendering. - Direct URLs cannot start an age-inappropriate topic without an explicit product-approved override.
- Valid operations continue to deep-link correctly.
- TypeScript enforces an exhaustive generator switch.
- Route/component tests cover all six operations and invalid inputs.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DogStark/mathbloc のほかの issue
-
Make adaptive tutor difficulty and weak-area tracking operation-specific対応中かも @caramel222 が 93 日前に担当しました。 オープンGrantFox OSS Maybe Rewarded Third Campaign
-
Eliminate timer races and stale callbacks across game session lifecycle対応中かも @caramel222 が 93 日前に担当しました。 オープンGrantFox OSS Maybe Rewarded Third Campaign
DogStark/mathbloc の issue をすべて見る
似ている issue
-
[BUG]: Shared links drop the configured basePath on GitHub Pages対応中かも @anshulchikhale30-p が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: GTrekkerオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
メンテナーはふだん 1 日以内に返信
-
area: ui Bug Payload OSS
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
payloadcms/payload#19839 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信