slackapi / slackapi/bolt-python

403 when using special characters

オープン
#902 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:adapter area:async need info question
主要言語
Python
スター
1.3k
フォーク
288
平均マージ
1日 8時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。