SignatureVerifier.is_valid raises instead of returning False for a malformed timestamp, signature or body
Maintainers usually reply within 1 day
@AmyScript is already working on this.
Since Nov 20, 2026.
- #2075 by @tony1233200 — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 57/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design, security
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 4k
- Forks
- 874
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 64
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from slackapi/python-slack-sdk
-
`WebClient` raises `JSONDecodeError` instead of `SlackApiError` on a malformed JSON body when retry handlers are setPossibly taken @agustin18 claimed this 13 days ago. Openbug semver:major web-client
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
slackapi/python-slack-sdk#2070 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 42/100
slackapi/python-slack-sdk#2066 ·
Maintainers usually reply within 1 day
-
Add missing Web API methods that are documented on docs.slack.dev to WebClientPossibly taken @zimeg claimed this 19 days ago. Openenhancement web-client
Difficulty 4/5 3-5 days Newbie friendliness 35/100
slackapi/python-slack-sdk#2014 · 2 comments · 2 reactions · 2 assignees ·
Maintainers usually reply within 1 day
-
Installation and Bot reject ISO 8601 timestamps with a negative UTC offset or a Z suffixPossibly taken @hello-ashleyintech claimed this 44 days ago. Openauto-triage-stale bug
slackapi/python-slack-sdk#1989 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelMay be free again A pull request for this issue was closed without being merged. Openauto-triage-skip enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
slackapi/python-slack-sdk#1923 · 2 comments ·
Maintainers usually reply within 1 day
All issues in slackapi/python-slack-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bad-antics/lateralus-lang#1623 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fossguild/thelifesnake#82 ·
Maintainers usually reply within 1 day
-
Unfitted DialectClassifier crashes with a confusing ValueError: raise a clear "not fitted" errorOpengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
omarelshamy25x/shamy-arabic-nlp#111 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pietbarber/Manage2Soar#1189 ·
Maintainers usually reply within 1 day
-
BUG: write_netcdf fails on Tutorial 3 BEM output with pandas CategoricalDtype DOF coordinatesPossibly taken @dtgaebe claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sandialabs/WecOptTool#467 ·