Summary: | [macOS] Issue sandbox extension to icon services when starting a drag operation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Per Arne Vollan <pvollan> | ||||||
Component: | WebKit Misc. | Assignee: | Per Arne Vollan <pvollan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Per Arne Vollan
2020-11-19 07:10:53 PST
Created attachment 414578 [details]
Patch
Comment on attachment 414578 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414578&action=review r=me, but please make sure you revoke the extensions in the early return case. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:2834 > bool shouldHandleEvent = true; I think there is an early return in the "if !(shouldHandleEvent)" case. You should probably add a revokeSandboxExtensions there, too. > Source/WebKit/WebProcess/WebPage/WebPage.cpp:7060 > +Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(SandboxExtension::HandleArray&& sandboxExtensions) We do something similar-ish in UserMediaProcessManager::revokeSandboxExtensionsIfNeeded. We might consider a future bug to consolidate the logic. Created attachment 414976 [details]
Patch
(In reply to Brent Fulgham from comment #3) > Comment on attachment 414578 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=414578&action=review > > r=me, but please make sure you revoke the extensions in the early return > case. > > > Source/WebKit/WebProcess/WebPage/WebPage.cpp:2834 > > bool shouldHandleEvent = true; > > I think there is an early return in the "if !(shouldHandleEvent)" case. You > should probably add a revokeSandboxExtensions there, too. > Fixed by consuming the extensions after the early return. > > Source/WebKit/WebProcess/WebPage/WebPage.cpp:7060 > > +Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(SandboxExtension::HandleArray&& sandboxExtensions) > > We do something similar-ish in > UserMediaProcessManager::revokeSandboxExtensionsIfNeeded. We might consider > a future bug to consolidate the logic. Thanks for reviewing! Committed r270216: <https://trac.webkit.org/changeset/270216> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414976 [details]. |