GUI rejects valid empty-string SearchReplaceConverter settings, preventing deletion converters

オープン 初心者向け
#3,749 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@Darshika140 がすでに取り組んでいます。

2026年11月2日 から。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, react, typescript
領域
frontend

調査の方向性

引用されている検証ロジックがある frontend/src/components/Config/CreateConverterDialog.tsx から始め、フォームの動作をissue内の /api/converters の例と比較してください。置換文字列が空、パターンが空、空白文字がリテラルである場合の回帰テストを追加してください。置換文字列が空でも受け入れられて一致箇所が削除され、他のケースが意図どおりに動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

help wanted
Describe the bug

The converter form treats a valid empty replacement string as missing, blocking a SearchReplaceConverter that should delete matched text.

Steps/Code to Reproduce

In Chat > converter panel > Add converter, choose SearchReplaceConverter, enter pattern remove-me, leave replace empty, and click Add Converter. Compare with POST /api/converters using {pattern: 'remove-me', replace: ''} and preview original keep remove-me.

Expected Results

Empty replacement should be accepted and remove matches. Required constructor arguments do not necessarily imply nonempty string values.

Actual Results

Form stays open with Required under replace and sends no create request. Same API parameters return HTTP 201; preview returns keep . API also accepts a literal-space pattern and previews a b as a_b.

Verified source reference: CreateConverterDialog.

Proposed fix/regression: distinguish unset from empty strings and avoid trimming meaningful values for requiredness; test empty replacement, empty pattern, and literal whitespace.

Screenshots

Screenshot is a local recovery artifact, not attached here.

Versions

Tested commit d3446e045960b5ebee4641aa70fdeb03af186587, PyRIT 1.2.0.dev0, offline Playwright with real local converter APIs. Evidence: files/evidence/round10/empty-string-contract.json; local path is not an attachment.

主要言語
Python
スター
4.7k
フォーク
1k
平均マージ
2日 2時間
マージ済み PR(30日)
439

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。