slackapi / slackapi/bolt-python

403 when using special characters

Open
#902 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:adapter area:async need info question
Dominant language
Python
Stars
1.3k
Forks
288
Avg merge
1d 8h
Merged PRs (30d)
10

Description

Issue: When using special characters like "ö" app_handler.handle(request) will return Unauthorized.

Tools: I'm using FastAPI AsyncSlackRequestHandler adapter. I don't know if this happends in without adapters on others, this is my use case.

With this code can be reproduced: https://github.com/slackapi/bolt-python/blob/main/examples/fastapi/async_app.py

Simply using the mention listener and as a user on slack send a special character, 403 will be returned.

Hypothesis: I believe is the way the raw body is handled, that when using special characters is not well decoded or something, I'll keep looking to see if I find a solution, in the meantime reporting this as issue since seems pretty clear is one

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/fastapi/async_app.py and the FastAPI AsyncSlackRequestHandler path used by app_handler.handle(request). Reproduce the mention listener with a message containing “ö” and compare it with an ASCII message while tracing raw-body handling. Done means special-character messages no longer return 403 while normal request handling still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.