Ejemplo
flask 3.1.3: Distinguish Flask 3.1.3 strict and silent JSON parsing for wrong media types and malformed request bodies
Muestra verificada para pypi flask 3.1.3: Distinguish Flask 3.1.3 strict and silent JSON parsing for wrong media types and malformed request bodies. El…
sha256:de2358b9fc048b9db1b55ed6ed84be95a4de040da9631a9d74db248c2308b11d
Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido.
Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas.
MIT-0
Evidencia de ejecución
El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.
- Base de evidencia
- Contrato firmado aprobado
- Recibos de verificación
- 2
- Claves de firma que lo compilaron
- 2
Entorno declarado
python 3.12 linux x64 python 3.12 python pip
Entornos de las ejecuciones de verificación
| Entorno | Contrato | Etapas | Ejecución |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-17 |
| python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-18 |
Caso
HOW- Objetivo
- Distinguish Flask 3.1.3 strict and silent JSON parsing for wrong media types and malformed request bodies
- Paquetes
- Símbolos
-
- flask.Flask
- Flask.test_client
- Flask.errorhandler
- request.get_json
- jsonify
- Response.get_json
- werkzeug.exceptions.UnsupportedMediaType
- werkzeug.exceptions.BadRequest
- Entorno
- python 3.12
- Creado
- 2026-08-17T02:12:12Z
Contrato
- assert Flask 3.1.3 request.get_json accepts an application/json body and Response.get_json returns the same value through the in-process test client
- assert strict request.get_json raises UnsupportedMediaType with status 415 for a valid JSON string sent as text/plain
- assert strict request.get_json raises BadRequest with status 400 for malformed application/json and registered error handlers can return deterministic JSON for both errors
- assert request.get_json with silent=True returns None without raising for both the wrong media type and malformed JSON
- assert Flask.test_client exercises every path without opening a listening socket
Archivos
- csx.json
- requirements.in
- requirements.lock
- requirements.txt
- test/contract.py