BUG HTTPTarget stores responses as str(bytes) and the JSON callback can't address keys with digits or hyphens
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
HTTPTarget、HTTPXAPITarget、および _fetch_key のエントリポイントを特定し、それらのレスポンス内容とキーのトークンの扱いを issue の例と比較します。参照として doc/code/targets/10_http_target.ipynb に保存された出力を確認します。レスポンスのテキストがデコード済みのまま保持され、数字またはハイフンを含むキーを分割されずに指定できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Two problems in the HTTP targets.
First, HTTPTarget and HTTPXAPITarget save str(response.content) when there's no callback. content is bytes, so what ends up in memory is the Python repr: b'...' with every non-ASCII character escaped. The regex callback searches that same repr, so matches pick up escapes and a trailing quote:
server text: 'Sure — here’s the answer:\nStep 1: café'
stored: "b'Sure \\xe2\\x80\\x94 here\\xe2\\x80\\x99s the answer:\\nStep 1: caf\\xc3\\xa9'"
regex 'Step 1: .*': "Step 1: caf\\xc3\\xa9'"
You can see it in the saved output of doc/code/targets/10_http_target.ipynb too (b'<!DOCTYPE html>...).
Second, _fetch_key tokenizes with ([a-zA-Z_]+), so keys with digits or hyphens get split. output2 looks up output, generated-text looks up generated, and both raise.
Fix: use response.text, and treat anything other than ., [ and ] as part of a key.
- 主要言語
- Python
- スター
- 4.5k
- フォーク
- 896
- 平均マージ
- 3日 8時間
- マージ済み PR(30日)
- 191
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/PyRIT の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100