slackapi / slackapi/bolt-python

403 when using special characters

未关闭
#902 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:adapter area:async need info question
主要语言
Python
星标
1.3k
派生
288
平均合并
1 天 8 小时
30 天内合并 PR
10

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 examples/fastapi/async_app.py 以及 app_handler.handle(request) 使用的 FastAPI AsyncSlackRequestHandler 路径开始。使用包含“ö”的消息复现 mention listener,并在跟踪 raw body 处理的同时将其与 ASCII 消息进行比较。当包含特殊字符的消息不再返回 403,同时正常的请求处理仍然有效时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
fastapi, python
领域
api, backend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。