WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
202012
Regression(
r248832
): Unable to quicklook HTML files in Mail
https://bugs.webkit.org/show_bug.cgi?id=202012
Summary
Regression(r248832): Unable to quicklook HTML files in Mail
Chris Dumez
Reported
2019-09-19 15:47:30 PDT
Unable to quicklook HTML files in Mail due to sandboxing since
r248832
.
Attachments
Patch
(11.65 KB, patch)
2019-09-19 16:06 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(11.95 KB, patch)
2019-09-19 16:08 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(11.93 KB, patch)
2019-09-19 16:10 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(12.03 KB, patch)
2019-09-19 16:23 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(1.82 KB, patch)
2019-09-20 07:36 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-09-19 15:47:45 PDT
<
rdar://problem/55285295
>
Chris Dumez
Comment 2
2019-09-19 16:06:10 PDT
Created
attachment 379171
[details]
Patch
Chris Dumez
Comment 3
2019-09-19 16:08:04 PDT
Created
attachment 379172
[details]
Patch
Chris Dumez
Comment 4
2019-09-19 16:10:11 PDT
Created
attachment 379173
[details]
Patch
Brent Fulgham
Comment 5
2019-09-19 16:15:32 PDT
Comment on
attachment 379173
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=379173&action=review
Thank you for jumping on this bug. r=me
> Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:-225 > - }
Is this the Mail case?
> Source/WebKit/UIProcess/WebPageProxy.cpp:1186 > + if (!process->isLaunching() || !url.isLocalFile())
Why don't we call into the WebPageProxy::loadFile code path when the url is a local file? Are there cases that are "isLocalFile" but shouldn't use the file loading path?
> Source/WebKit/UIProcess/WebPageProxy.cpp:1241 > + if (!m_process->isLaunching())
This would be clearer if we flipped the check: if (m_process->isLaunching()) ... Send the 'LoadRequestWaitingForPID' message else .... Send the 'LoadRequest' message. But I guess that is the reverse of the "load from network' case.
Geoffrey Garen
Comment 6
2019-09-19 16:17:01 PDT
Comment on
attachment 379173
[details]
Patch r=me Can we regression test this? (Maybe possible through an API test that issues a file URL load?)
> Source/WebKit/ChangeLog:10 > + the same logic to initializing the sandbox extension if the process has already
to initialize had already
> Source/WebKit/ChangeLog:13 > + the client did not provided one. The logic in maybeInitializeSandboxExtensionHandle()
provide
Chris Dumez
Comment 7
2019-09-19 16:19:25 PDT
(In reply to Geoffrey Garen from
comment #6
)
> Comment on
attachment 379173
[details]
> Patch > > r=me > > Can we regression test this? (Maybe possible through an API test that issues > a file URL load?)
No because our API tests are not sandboxed.
> > > Source/WebKit/ChangeLog:10 > > + the same logic to initializing the sandbox extension if the process has already > > to initialize > > had already > > > Source/WebKit/ChangeLog:13 > > + the client did not provided one. The logic in maybeInitializeSandboxExtensionHandle() > > provide
Chris Dumez
Comment 8
2019-09-19 16:22:36 PDT
Comment on
attachment 379173
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=379173&action=review
>> Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:-225 >> - } > > Is this the Mail case?
The mail case is
https://trac.webkit.org/changeset/247400/webkit
, which is in maybeInitializeSandboxExtensionHandle(). This is why I am now calling maybeInitializeSandboxExtensionHandle().
>> Source/WebKit/UIProcess/WebPageProxy.cpp:1186 >> + if (!process->isLaunching() || !url.isLocalFile()) > > Why don't we call into the WebPageProxy::loadFile code path when the url is a local file? Are there cases that are "isLocalFile" but shouldn't use the file loading path?
I would need to look into it more to see if there would be side effects from calling loadFile(). In any case, I'd rather not do this in this patch to reduce risk.
>> Source/WebKit/UIProcess/WebPageProxy.cpp:1241 >> + if (!m_process->isLaunching()) > > This would be clearer if we flipped the check: > > if (m_process->isLaunching()) > ... Send the 'LoadRequestWaitingForPID' message > else > .... Send the 'LoadRequest' message. > > But I guess that is the reverse of the "load from network' case.
Ok.
Chris Dumez
Comment 9
2019-09-19 16:23:36 PDT
Created
attachment 379174
[details]
Patch
Chris Dumez
Comment 10
2019-09-19 16:55:40 PDT
Comment on
attachment 379174
[details]
Patch Clearing flags on attachment: 379174 Committed
r250110
: <
https://trac.webkit.org/changeset/250110
>
Chris Dumez
Comment 11
2019-09-19 16:55:41 PDT
All reviewed patches have been landed. Closing bug.
Per Arne Vollan
Comment 12
2019-09-20 05:37:58 PDT
Comment on
attachment 379174
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=379174&action=review
> Source/WebKit/UIProcess/WebPageProxy.cpp:1239 > > m_process->assumeReadAccessToBaseURL(*this, resourceDirectoryURL);
I think this line should be removed, since this is handled inside maybeInitializeSandboxExtensionHandle now, and can cause a later call of maybeInitializeSandboxExtensionHandle to just bail if read access is already assumed.
Chris Dumez
Comment 13
2019-09-20 07:33:19 PDT
(In reply to Per Arne Vollan from
comment #12
)
> Comment on
attachment 379174
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=379174&action=review
> > > Source/WebKit/UIProcess/WebPageProxy.cpp:1239 > > > > m_process->assumeReadAccessToBaseURL(*this, resourceDirectoryURL); > > I think this line should be removed, since this is handled inside > maybeInitializeSandboxExtensionHandle now, and can cause a later call of > maybeInitializeSandboxExtensionHandle to just bail if read access is already > assumed.
Good catch, thanks.
Chris Dumez
Comment 14
2019-09-20 07:33:33 PDT
Reopen to fix issue found by Per Arne.
Chris Dumez
Comment 15
2019-09-20 07:36:05 PDT
Created
attachment 379238
[details]
Patch
Per Arne Vollan
Comment 16
2019-09-20 07:51:35 PDT
Comment on
attachment 379238
[details]
Patch Thanks for fixing this bug! R=me.
WebKit Commit Bot
Comment 17
2019-09-20 08:23:56 PDT
Comment on
attachment 379238
[details]
Patch Clearing flags on attachment: 379238 Committed
r250130
: <
https://trac.webkit.org/changeset/250130
>
WebKit Commit Bot
Comment 18
2019-09-20 08:23:58 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug