SignatureVerifier.is_valid raises instead of returning False for a malformed timestamp, signature or body
Los mantenedores suelen responder en 1 día
@AmyScript ya está trabajando en esto.
Desde el 20/11/2026.
- #2075 de @tony1233200 — cerrado sin fusionar
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design, security
Línea de trabajo
Start with SignatureVerifier.is_valid() and its existing tests, including test_is_valid_none; the issue names the malformed timestamp, signature, and body cases. Confirm each currently raises, then make sure the tests expect False for all three while preserving the missing-value behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
SignatureVerifier.is_valid() (and is_valid_request()) returns False for missing values, but three kinds of malformed input from the request raise instead:
from slack_sdk.signature import SignatureVerifier
v = SignatureVerifier("secret")
v.is_valid("body", "abc", "v0=aa") # ValueError: invalid literal for int() with base 10: 'abc'
v.is_valid("body", "1531420618", "v0=é") # TypeError: comparing strings with non-ASCII characters is not supported
v.is_valid(b"\xff\xfe", "1531420618", "v0=aa") # UnicodeDecodeError (body is decoded before the signature is compared)
(For the last two, use a timestamp inside the 5 minute window.)
The timestamp and signature come straight from the X-Slack-Request-Timestamp and X-Slack-Signature headers, so anyone can send them. In bolt-python, RequestVerification.process calls is_valid directly, so such a request does not get the 401 invalid request response; the exception goes through the generic error path in App.dispatch and ends as a 500.
It is not a way around the check, the request is still rejected. But the method is documented as "Verifies if the given signature is valid" and test_is_valid_none already expects False for missing values, so returning False for these seems to be the intended contract.
I have a small fix with tests (catch the three cases in is_valid and return False). Happy to open a PR if that works for you.
Checked on main at b935494.
- Lenguaje dominante
- Python
- Estrellas
- 4k
- Forks
- 874
- Merge medio
- 13 h 22 min
- PR fusionados (30 d)
- 64
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 slackapi/python-slack-sdk
-
`WebClient` raises `JSONDecodeError` instead of `SlackApiError` on a malformed JSON body when retry handlers are setPosiblemente ocupada @agustin18 la tomó hace 13 días. Abiertobug semver:major web-client
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
slackapi/python-slack-sdk#2070 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 42/100
slackapi/python-slack-sdk#2066 ·
Los mantenedores suelen responder en 1 día
-
Add missing Web API methods that are documented on docs.slack.dev to WebClientPosiblemente ocupada @zimeg la tomó hace 19 días. Abiertoenhancement web-client
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
slackapi/python-slack-sdk#2014 · 2 comentarios · 2 reacciones · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Installation and Bot reject ISO 8601 timestamps with a negative UTC offset or a Z suffixPosiblemente ocupada @hello-ashleyintech la tomó hace 44 días. Abiertoauto-triage-stale bug
slackapi/python-slack-sdk#1989 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoauto-triage-skip enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
slackapi/python-slack-sdk#1923 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de slackapi/python-slack-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bad-antics/lateralus-lang#1623 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
fossguild/thelifesnake#82 ·
Los mantenedores suelen responder en 1 día
-
Unfitted DialectClassifier crashes with a confusing ValueError: raise a clear "not fitted" errorAbiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
omarelshamy25x/shamy-arabic-nlp#111 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pietbarber/Manage2Soar#1189 ·
Los mantenedores suelen responder en 1 día
-
BUG: write_netcdf fails on Tutorial 3 BEM output with pandas CategoricalDtype DOF coordinatesPosiblemente ocupada @dtgaebe la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sandialabs/WecOptTool#467 ·