| Summary: | Web Inspector: [Mac] Saving webarchives via Web Inspector in Safari creates files that are not double clickable | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED WONTFIX | ||||||||
| Severity: | Normal | CC: | andersca, ap, graouts, joepeck, sam, timothy, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | DoNotImportToRadar | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Attachments: |
|
||||||||
|
Description
Joseph Pecoraro
2014-12-04 11:09:23 PST
Created attachment 242576 [details]
[PATCH] Proposed Fix
Comment on attachment 242576 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=242576&action=review > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:63 > +static void removeQuarantinePropertiesFromFile(NSURL *path) It seems unfortunate to have multiple copies of this non-trivial function. > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:383 > + removeQuarantinePropertiesFromFile(actualURL); This looks strange to me. If an application gets its files automatically quarantined, then can it actually remove the quarantine? (In reply to comment #3) > Comment on attachment 242576 [details] > [PATCH] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242576&action=review > > > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:63 > > +static void removeQuarantinePropertiesFromFile(NSURL *path) > > It seems unfortunate to have multiple copies of this non-trivial function. Yep. I considered putting this in WebCore/platform/FileSystemMac.mm. Would you prefer that? > > Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:383 > > + removeQuarantinePropertiesFromFile(actualURL); > > This looks strange to me. If an application gets its files automatically > quarantined, then can it actually remove the quarantine? I had only tested with Safari, and that was the case. It seems anyone can remove the xattr from a file. For example: shell> xattr -d com.apple.quarantine /path/to/file > Yep. I considered putting this in WebCore/platform/FileSystemMac.mm. Would > you prefer that? Yes. > It seems anyone can remove the xattr from a file. It's not anyone, this depends on their sandbox. A correct sandbox would normally disallow that, and I thought that AppSandbox did. Created attachment 242582 [details]
[PATCH] Proposed Fix
Shared the code in FileSystemMac. If there is an error removing the quarantine property it is fine to ignore it.
Comment on attachment 242582 [details]
[PATCH] Proposed Fix
We decided that we don't need this.
|