Stripe webhook accepts events when no webhook secret is configured
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Lee contentcuration/contentcuration/settings.py y la vista stripe_webhook en contentcuration/contentcuration/views/subscription.py. Añade cobertura para un secreto configurado vacío y un evento firmado correctamente cuando hay un secreto establecido; confirma que las solicitudes con el secreto vacío devuelven 4xx sin cambiar los datos de la suscripción, mientras que los eventos firmados válidos siguen funcionando. Registra un error cuando falta el secreto y asegúrate de que la aplicación pueda iniciarse sin variables de Stripe.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
STRIPE_WEBHOOK_SECRET defaults to an empty string when its environment variable is unset, and stripe_webhook then verifies events against that empty key. On a deployment without the variable, anyone can send a webhook signed with the empty key and change a user's subscription storage.
Complexity: Low
Target branch: hotfixes
Context
settings.pyreadsSTRIPE_LIVE_WEBHOOK_SECRETorSTRIPE_TEST_WEBHOOK_SECRETwith a default of"".stripe_webhookpasses that value tostripe.Webhook.construct_eventunchecked.- Reproduced under the test settings: a
customer.subscription.updatedevent signed with an empty secret was accepted and set the user'ssubscription_disk_space.
The Change
stripe_webhookshould reject every event when the webhook secret is empty, and log an error saying the secret isn't configured.- Studio should still start without the Stripe variables, so development and test environments keep working.
Acceptance Criteria
General
- With an empty webhook secret, every webhook request returns 4xx and changes no subscription.
- With a webhook secret set, correctly signed events are handled as before.
Testing
- Tests cover an event signed with an empty secret while none is configured, and a correctly signed event while one is.
AI usage
I chose which audit findings belong in #6398 and set the access pattern. Claude Code found and reproduced this gap and drafted this issue.
- Lenguaje dominante
- Python
- Estrellas
- 212
- Forks
- 321
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 learningequality/studio
-
Community library status changes don't update `date_updated`Posiblemente ocupada @LightCreator1007 la tomó hace 1 día. AbiertoDEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
learningequality/studio#6414 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
learningequality/studio#6410 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
learningequality/studio#6409 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6407 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6400 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingPosiblemente ocupada @yipinghuang1991 la tomó hoy. Abiertocomp/agent P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NousResearch/hermes-agent#156837 ·
Los mantenedores suelen responder en 1 día
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsPosiblemente ocupada @muskan-creates352 la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
fedora-infra/anitya#2188 ·
Los mantenedores suelen responder en 1 día
-
docs documentation need-triage SaaS
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
integration:hermes
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
vectorize-io/hindsight#6601 ·
Los mantenedores suelen responder en 1 día
-
triage:product type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dbt-labs/dbt-adapters#2333 ·
Los mantenedores suelen responder en 1 día