Bug 209444

Summary: Add console message when legacy TLS is used
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, cdumez, darin, ews-watchlist, japhet, mkwst, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Alex Christensen 2020-03-23 15:48:19 PDT
Add console message when legacy TLS is used
Comment 1 Alex Christensen 2020-03-23 15:48:44 PDT
Created attachment 394314 [details]
Patch
Comment 2 Darin Adler 2020-03-23 15:56:57 PDT
Comment on attachment 394314 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394314&action=review

> Source/WebCore/loader/ResourceLoader.cpp:511
>                  document->setUsedLegacyTLS(true);

Could have put that inside the braces.
Comment 3 Alex Christensen 2020-03-23 16:22:20 PDT
Created attachment 394320 [details]
Patch
Comment 4 Alex Christensen 2020-03-23 16:23:03 PDT
Comment on attachment 394320 [details]
Patch

Done.  I also removed the host from the logs.
Comment 5 Darin Adler 2020-03-23 16:23:40 PDT
Comment on attachment 394320 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394320&action=review

> Source/WebCore/loader/ResourceLoader.cpp:509
> +                        page->console().addMessage(MessageSource::Network, MessageLevel::Warning, "Loaded resource using TLS 1.0 or 1.1, which are deprecated protocols that will be removed.  Please use TLS 1.2 or newer instead."_s, 0, document);

Two spaces after a period!? Not sure what our style is, but I never do that.
Comment 6 Alex Christensen 2020-03-23 16:24:20 PDT
Created attachment 394321 [details]
Patch
Comment 7 Alex Christensen 2020-03-23 16:26:40 PDT
Our style doesn't seem to care.  I've done it consistently since elementary school unless told otherwise, but I removed it here.
Comment 8 EWS 2020-03-23 17:06:35 PDT
Committed r258890: <https://trac.webkit.org/changeset/258890>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394321 [details].
Comment 9 Radar WebKit Bug Importer 2020-03-23 17:09:06 PDT
<rdar://problem/60800462>
Comment 10 Darin Adler 2020-03-23 17:09:29 PDT
Comment on attachment 394321 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394321&action=review

> Source/WebCore/loader/ResourceLoader.cpp:505
>      if (r.usedLegacyTLS()) {
>          if (m_frame) {

Just noticed we could indent this a little bit less by using && here.
Comment 11 Alex Christensen 2020-03-24 09:56:57 PDT
Reopening to attach new patch.
Comment 12 Alex Christensen 2020-03-24 09:56:58 PDT
Created attachment 394380 [details]
Patch
Comment 13 EWS 2020-03-24 10:20:36 PDT
commit-queue failed to commit attachment 394380 [details] to WebKit repository.
Comment 14 Aakash Jain 2020-03-24 13:36:08 PDT
(In reply to EWS from comment #13)
> commit-queue failed to commit attachment 394380 [details] to WebKit repository.
There was another commit (modifying same ChangeLog) https://trac.webkit.org/r258916 almost at the same time when commit-queue tried to land this. Please cq+ again.
Comment 15 EWS 2020-03-24 16:34:04 PDT
Committed r258957: <https://trac.webkit.org/changeset/258957>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394380 [details].