WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184239
Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=184239
Summary
Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKi...
Daniel Bates
Reported
2018-04-02 10:21:03 PDT
Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKitTestRunner.
Attachments
Patch
(16.90 KB, patch)
2018-04-02 10:23 PDT
,
Daniel Bates
ap
: review+
ap
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2018-04-02 10:23:39 PDT
Created
attachment 336995
[details]
Patch
EWS Watchlist
Comment 2
2018-04-02 10:25:28 PDT
Attachment 336995
[details]
did not pass style-queue: ERROR: Tools/WebKitTestRunner/TestController.cpp:1763: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 3
2018-04-02 10:35:25 PDT
Comment on
attachment 336995
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=336995&action=review
> Tools/DumpRenderTree/mac/DumpRenderTree.mm:1253 > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[[NSString alloc] initWithUTF8String:host.c_str()]];
This leaks the string (as we don't seem to be using ARC in DRT).
> Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:57 > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host];
What are the iOS versions where we still perform network loading from the WebContent process?
> Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:99 > + for (auto& host : m_allowedHosts) > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host];
What are the macOS versions where we still perform network loading from the WebContent process?
> Tools/WebKitTestRunner/TestController.cpp:1763 > + return std::any_of(m_allowedHosts.begin(), m_allowedHosts.end(), [host] (const std::string& allowedHost) { return host == allowedHost; });
Wouldn't m_allowedHosts.find() work here?
Daniel Bates
Comment 4
2018-04-02 10:47:03 PDT
(In reply to Alexey Proskuryakov from
comment #3
)
> Comment on
attachment 336995
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=336995&action=review
> > > Tools/DumpRenderTree/mac/DumpRenderTree.mm:1253 > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[[NSString alloc] initWithUTF8String:host.c_str()]]; > > This leaks the string (as we don't seem to be using ARC in DRT). >
Oops! Will use -autorelease.
> > Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:57 > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host]; > > What are the iOS versions where we still perform network loading from the > WebContent process? > > > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:99 > > + for (auto& host : m_allowedHosts) > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host]; > > What are the macOS versions where we still perform network loading from the > WebContent process? >
I do not know. I hope you do not mind that I defer cleaning this up.
> > Tools/WebKitTestRunner/TestController.cpp:1763 > > + return std::any_of(m_allowedHosts.begin(), m_allowedHosts.end(), [host] (const std::string& allowedHost) { return host == allowedHost; }); > > Wouldn't m_allowedHosts.find() work here?
Will change m_allowedHosts from a std::vector to a std::set and use std::set::find().
Daniel Bates
Comment 5
2018-04-02 10:47:42 PDT
(In reply to Alexey Proskuryakov from
comment #3
)
> > Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:57 > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host]; > > What are the iOS versions where we still perform network loading from the > WebContent process? >
I don't know. I hope you do not mind that I defer cleaning this up.
Daniel Bates
Comment 6
2018-04-02 11:48:30 PDT
(In reply to Daniel Bates from
comment #5
)
> (In reply to Alexey Proskuryakov from
comment #3
) > > > Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:57 > > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host]; > > > > What are the iOS versions where we still perform network loading from the > > WebContent process? > > > > I don't know. I hope you do not mind that I defer cleaning this up.
We no longer need this code. We remove this code in
bug #184242
. (In reply to Daniel Bates from
comment #4
)
> > > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:99 > > > + for (auto& host : m_allowedHosts) > > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:host]; > > > > What are the macOS versions where we still perform network loading from the > > WebContent process? > > > > I do not know. I hope you do not mind that I defer cleaning this up.
We no longer need this code. We remove this code in
bug #184242
.
Daniel Bates
Comment 7
2018-04-02 12:14:18 PDT
(In reply to Daniel Bates from
comment #4
)
> (In reply to Alexey Proskuryakov from
comment #3
) > > Comment on
attachment 336995
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=336995&action=review
> > > > > Tools/DumpRenderTree/mac/DumpRenderTree.mm:1253 > > > + [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[[NSString alloc] initWithUTF8String:host.c_str()]]; > > > > This leaks the string (as we don't seem to be using ARC in DRT). > > > > Oops! Will use -autorelease. >
Even better, will use the convenience API -stringWithUTF8String as it calls -autorelease and using it simplifies this code.
Daniel Bates
Comment 8
2018-04-02 16:12:22 PDT
Committed
r230192
: <
https://trac.webkit.org/changeset/230192
>
Radar WebKit Bug Importer
Comment 9
2018-04-02 16:13:35 PDT
<
rdar://problem/39122881
>
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