Conversation editor never revokes blob URLs of removed attachments
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- frontend
Research direction
Start with ChatInputArea.changeAttachments, which already revokes dropped blob URLs, and compare it with useConversationDraft.changeAttachments, which the ConversationEditor piece editor calls without revoking anything. The attachment chip URLs are created in PromptEditor with URL.createObjectURL. Done means removing an attachment in the draft editor calls URL.revokeObjectURL right away. Pull request #3186 is already open against this issue, so review or build on that work rather than starting a parallel fix.
Written by the indexing model from the issue text.
Description
Describe the bug
In the conversation editor, removing an attachment from a media piece never revokes the attachment's blob object URL. The blob: URL and its File payload stay alive until the whole draft is discarded or the editor unmounts.
ChatInputArea.changeAttachments handles the same removal correctly by revoking dropped blob URLs, but the draft editor path (ConversationEditor piece editor calling useConversationDraft.changeAttachments) forwards the new attachment list straight through with no revocation. Attaching and removing a large file repeatedly during one editing session pins every dropped File in memory.
Steps/Code to Reproduce
- Open a conversation in the editor and pick a media piece.
- Attach a file (the attachment chip gets a
blob:URL fromURL.createObjectURLin PromptEditor). - Remove the attachment with the chip's dismiss button.
URL.revokeObjectURLis never called for that URL until the draft is discarded or the editor unmounts.
Repeat 2-3 in one session and the dropped Files accumulate.
Expected Results
Removing an attachment in the editor revokes its blob object URL immediately, the same way the chat composer does.
Actual Results
The URL stays valid and the File payload stays pinned until the draft is discarded or unmounted.
Screenshots
N/A
Versions
OS: macOS
Browser: Chrome
Python version: 3.14
PyRIT version: installed from main (66c41fa)
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 944
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 328
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PyRIT
-
BUG UnicodeReplacementConverter writes characters outside the BMP as invalid five-digit \u escapesPossibly taken @ShivamSharma43 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
BUG: label queries only return the final conversation of an attackPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
microsoft/PyRIT#3095 · 3 comments ·
Maintainers usually reply within 2 days
-
BUG Configuration keeps runtime-status errors after polling recoversPossibly taken @joeyvictorino claimed this 3 days ago. OpenBug: triage GUI help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
microsoft/PyRIT#2868 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
BUG: MemoryInterface.get_request_from_response fails with IndexError for non-zero starting sequence or sequence gapsPossibly taken @RohithPariki claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 2 days
-
Scenario progress double-counts an attack result after its timestamp is bumpedPossibly taken @ManoharPaturi claimed this 1 day ago. Open
Difficulty 3/5 Half a day Newbie friendliness 25/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
[Bug]: Importing weave changes the process-wide localePossibly taken @himanshu748 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
UX
Difficulty 1/5 Under an hour Newbie friendliness 72/100
mediajunkie/piper-morgan-product#2008 · 2 comments ·