Validate operation route parameters and enforce age-appropriate topics
@jd5073356-max ya está trabajando en esto.
Desde el 19/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 8
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DogStark/mathbloc
-
Make adaptive tutor difficulty and weak-area tracking operation-specificPosiblemente ocupada @caramel222 la tomó hace 93 días. AbiertoGrantFox OSS Maybe Rewarded Third Campaign
-
Eliminate timer races and stale callbacks across game session lifecyclePosiblemente ocupada @caramel222 la tomó hace 93 días. AbiertoGrantFox OSS Maybe Rewarded Third Campaign
Todos los issues de DogStark/mathbloc
Issues similares
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existPosiblemente ocupada @franpts2 la tomó hoy. Abiertodocs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días
-
ready-for-agent
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
cloudflare/nimbus#423 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPosiblemente ocupada @anshulchikhale30-p la tomó hoy. Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comentario ·
Los mantenedores suelen responder en 1 día