WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184433
Refactor Ignore HSTS code
https://bugs.webkit.org/show_bug.cgi?id=184433
Summary
Refactor Ignore HSTS code
John Wilander
Reported
2018-04-09 16:38:43 PDT
Darin Adler pointed out in
https://bugs.webkit.org/show_bug.cgi?id=184335
that we might have subtle bugs in the ignore HSTS code due to type conversion. He also suggested moving non-SPI code out of the CFNetwork SPI header. This bug tracks that work.
Attachments
Patch
(6.19 KB, patch)
2018-04-09 17:55 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Patch for landing
(6.06 KB, patch)
2018-04-09 20:06 PDT
,
John Wilander
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-04-09 16:39:23 PDT
<
rdar://problem/39298238
>
John Wilander
Comment 2
2018-04-09 17:55:30 PDT
Created
attachment 337565
[details]
Patch
Darin Adler
Comment 3
2018-04-09 18:40:49 PDT
Comment on
attachment 337565
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=337565&action=review
> Source/WebCore/platform/network/mac/WebCoreURLResponse.mm:337 > + return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] > + && [request _schemeWasUpgradedDueToDynamicHSTS];
Should fix indentation of the second line, indent by 4 spaces.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:189 > + return [request respondsToSelector:@selector(_schemeWasUpgradedDueToDynamicHSTS)] > + && [request _schemeWasUpgradedDueToDynamicHSTS];
Should fix indentation of the second line, indent by 4 spaces.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:197 > + if ([request respondsToSelector:@selector(_setIgnoreHSTS:)]) { > + BOOL ignoreHSTSParameter = ignoreHSTS; > + [request _setIgnoreHSTS:ignoreHSTSParameter]; > + }
This local BOOL is not needed here. It *was* needed for wtfObjcMsgSend, but here you can just pass the bool ignoreHSTS and it will be converted to a BOOL. Thus no braces needed either.
> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:203 > + return [request respondsToSelector:@selector(_ignoreHSTS)] > + && [request _ignoreHSTS];
Should fix indentation of the second line, indent by 4 spaces.
John Wilander
Comment 4
2018-04-09 20:06:35 PDT
Created
attachment 337579
[details]
Patch for landing
John Wilander
Comment 5
2018-04-09 20:07:09 PDT
Thanks for the review and change suggestions, Darin!
WebKit Commit Bot
Comment 6
2018-04-09 20:43:51 PDT
Comment on
attachment 337579
[details]
Patch for landing Clearing flags on attachment: 337579 Committed
r230467
: <
https://trac.webkit.org/changeset/230467
>
WebKit Commit Bot
Comment 7
2018-04-09 20:43:53 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