WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209011
WKWebView._negotiatedLegacyTLS should be correct after back/forward navigations
https://bugs.webkit.org/show_bug.cgi?id=209011
Summary
WKWebView._negotiatedLegacyTLS should be correct after back/forward navigations
Alex Christensen
Reported
2020-03-12 12:40:45 PDT
WKWebView._negotiatedLegacyTLS should be correct after back/forward navigations
Attachments
Patch
(2.54 KB, patch)
2020-03-12 12:41 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(16.17 KB, patch)
2020-03-12 13:41 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(17.85 KB, patch)
2020-03-13 10:55 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-03-12 12:41:12 PDT
Created
attachment 393396
[details]
Patch
Alex Christensen
Comment 2
2020-03-12 13:41:16 PDT
Created
attachment 393409
[details]
Patch
youenn fablet
Comment 3
2020-03-13 03:03:15 PDT
Comment on
attachment 393409
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393409&action=review
> Source/WebCore/history/CachedFrame.cpp:322 > + if (cachedFrame && cachedFrame->usedLegacyTLS() == UsedLegacyTLS::Yes)
s/cachedFrame &&// as probably we cannot have null child frames. We could use a Vector<UniqueRef> to make it clearer.
> Source/WebKit/NetworkProcess/NetworkDataTask.cpp:114 > + response.setSource(ResourceResponse::Source::Network);
Why do we need this change? We are still setting the source for redirections in NetworkLoad. It seems better to keep everything in one place.
> Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:136 > + if (response.usedLegacyTLS()) {
You probably also want to check the source, like if (response.usedLegacyTLS() && response.source() == Network). If it is from the network cache or service worker, we probably do not want to take that into account, as I understand the current implementation. If we wanted to take into account appcache/memorycache, the check should be done inside DocumentLoader. Service worker case is interesting since if a document is using it, it will never have usedLegacyTLS currently. Maybe we should fix this.
Alex Christensen
Comment 4
2020-03-13 10:54:03 PDT
Comment on
attachment 393409
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393409&action=review
>> Source/WebCore/history/CachedFrame.cpp:322 >> + if (cachedFrame && cachedFrame->usedLegacyTLS() == UsedLegacyTLS::Yes) > > s/cachedFrame &&// as probably we cannot have null child frames. > We could use a Vector<UniqueRef> to make it clearer.
Good idea. Done.
>> Source/WebKit/NetworkProcess/NetworkDataTask.cpp:114 >> + response.setSource(ResourceResponse::Source::Network); > > Why do we need this change? > We are still setting the source for redirections in NetworkLoad. > It seems better to keep everything in one place.
NetworkLoad is an unneeded abstraction that was originally representing either an NSURLSession load or an NSURLConnection load. Since we don't use NSURLConnection in modern WebKit anymore, we should move everything from it and remove it. As long as I'm changing the didReceiveResponse code and putting things here, This may as well go as well.
>> Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:136 >> + if (response.usedLegacyTLS()) { > > You probably also want to check the source, like if (response.usedLegacyTLS() && response.source() == Network). > If it is from the network cache or service worker, we probably do not want to take that into account, as I understand the current implementation. > > If we wanted to take into account appcache/memorycache, the check should be done inside DocumentLoader. > Service worker case is interesting since if a document is using it, it will never have usedLegacyTLS currently. > Maybe we should fix this.
Good idea, but moving it to DocumentLoader doesn't fix this. Moving it to ResourceLoader does. That looks like a better place for it.
Alex Christensen
Comment 5
2020-03-13 10:55:31 PDT
Created
attachment 393506
[details]
Patch
youenn fablet
Comment 6
2020-03-13 11:34:39 PDT
Comment on
attachment 393506
[details]
Patch lgtm As of setSource, it does not look great to have it in two places. I would leave that for a future refactoring that would add a platform independent redirection handler in NetworkDataTask so that setSource is no longer called in NetworkLoad. Also, I am not sure NetworkTask is the right place. Source is only useful for WebProcess so this seems more a NetworkResourceLoader thing
WebKit Commit Bot
Comment 7
2020-03-13 19:10:59 PDT
Comment on
attachment 393506
[details]
Patch Clearing flags on attachment: 393506 Committed
r258458
: <
https://trac.webkit.org/changeset/258458
>
WebKit Commit Bot
Comment 8
2020-03-13 19:11:01 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2020-03-13 19:11:16 PDT
<
rdar://problem/60443735
>
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