Repository navigation
fix(mcp): keep upload modal, skip short secrets and bad headers #42713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
529c42c
d657218
b69aeeb
36971b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,11 +43,16 @@ export const uploadFile = defineTabTool({ | |
|
|
||
| response.addCode(`await fileChooser.setFiles(${JSON.stringify(paths)})`); | ||
|
|
||
| tab.clearModalState(modalState); | ||
| await tab.waitForCompletion(async () => { | ||
| if (paths) | ||
| if (paths) { | ||
| try { | ||
| await modalState.fileChooser.setFiles(paths); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. awaiting
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Same change: |
||
| }); | ||
| } catch (e) { | ||
| response.addError(e instanceof Error ? e.message : String(e)); | ||
| return; | ||
| } | ||
| } | ||
| tab.clearModalState(modalState); | ||
| await tab.waitForCompletion(async () => {}); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. starting the completion wait after
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }, | ||
|
|
||
| clearsModalState: 'fileChooser', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please avoid configuring guessable values such as
abcas secrets rather than silently disabling redaction for short values (see microsoft/playwright-mcp#1106 (comment))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devin Rousso (@dcrousso)
Removed the
length < 4skip. Empty values are still ignored. The short-secret test is gone.36971b002