Title: [262990] branches/safari-609-branch
- Revision
- 262990
- Author
- alanc...@apple.com
- Date
- 2020-06-12 17:06:42 -0700 (Fri, 12 Jun 2020)
Log Message
Cherry-pick r262978. rdar://problem/64315997
Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=213147
<rdar://problem/64249683>
Reviewed by Geoffrey Garen.
Source/WebCore:
Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
This is a revert of r250437 due to push back from Web developers.
No new tests, updated existing tests.
* history/BackForwardCache.cpp:
(WebCore::canCacheFrame):
LayoutTests:
Update layout test coverage.
* http/tests/navigation/https-in-page-cache-expected.txt:
* http/tests/navigation/resources/https-in-page-cache-1.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609-branch/LayoutTests/ChangeLog (262989 => 262990)
--- branches/safari-609-branch/LayoutTests/ChangeLog 2020-06-13 00:06:38 UTC (rev 262989)
+++ branches/safari-609-branch/LayoutTests/ChangeLog 2020-06-13 00:06:42 UTC (rev 262990)
@@ -1,3 +1,46 @@
+2020-06-12 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r262978. rdar://problem/64315997
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
+ https://bugs.webkit.org/show_bug.cgi?id=213147
+ <rdar://problem/64249683>
+
+ Reviewed by Geoffrey Garen.
+
+ Source/WebCore:
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
+ This is a revert of r250437 due to push back from Web developers.
+
+ No new tests, updated existing tests.
+
+ * history/BackForwardCache.cpp:
+ (WebCore::canCacheFrame):
+
+ LayoutTests:
+
+ Update layout test coverage.
+
+ * http/tests/navigation/https-in-page-cache-expected.txt:
+ * http/tests/navigation/resources/https-in-page-cache-1.php:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-06-12 Chris Dumez <cdu...@apple.com>
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
+ https://bugs.webkit.org/show_bug.cgi?id=213147
+ <rdar://problem/64249683>
+
+ Reviewed by Geoffrey Garen.
+
+ Update layout test coverage.
+
+ * http/tests/navigation/https-in-page-cache-expected.txt:
+ * http/tests/navigation/resources/https-in-page-cache-1.php:
+
2020-06-10 Alan Coon <alanc...@apple.com>
Cherry-pick r262870. rdar://problem/64232759
Modified: branches/safari-609-branch/LayoutTests/http/tests/navigation/https-in-page-cache-expected.txt (262989 => 262990)
--- branches/safari-609-branch/LayoutTests/http/tests/navigation/https-in-page-cache-expected.txt 2020-06-13 00:06:38 UTC (rev 262989)
+++ branches/safari-609-branch/LayoutTests/http/tests/navigation/https-in-page-cache-expected.txt 2020-06-13 00:06:42 UTC (rev 262990)
@@ -1,5 +1,5 @@
-ALERT: This page is https and has the no-store cache-control directive. It should go in to the page cache.
-ALERT: The page was restored from the page cache. Good job. Running part 2 of the test.
+ALERT: This page is https and has the no-store cache-control directive. It should NOT go in to the page cache.
+ALERT: The page was reloaded on back, not from the page cache. Good job. Running part 2 of the test.
ALERT: This page is https and has the no-cache cache-control directive. It should go in to the page cache.
ALERT: The page was restored from the page cache. Good job!. Running part 3 of the test.
ALERT: This page is https and should go in to the page cache.
Modified: branches/safari-609-branch/LayoutTests/http/tests/navigation/resources/https-in-page-cache-1.php (262989 => 262990)
--- branches/safari-609-branch/LayoutTests/http/tests/navigation/resources/https-in-page-cache-1.php 2020-06-13 00:06:38 UTC (rev 262989)
+++ branches/safari-609-branch/LayoutTests/http/tests/navigation/resources/https-in-page-cache-1.php 2020-06-13 00:06:42 UTC (rev 262990)
@@ -11,7 +11,7 @@
window._onpageshow_ = function(evt) {
if (evt.persisted) {
- alert("The page was restored from the page cache. Good job. Running part 2 of the test.");
+ alert("The page was restored from the page cache. It should NOT have been. Running part 2 of the test.");
nextTest();
}
}
@@ -18,12 +18,12 @@
window._onload_ = function() {
if (window.sessionStorage.https_in_page_cache_started) {
- alert("The page was reloaded on back, not from the page cache. It should NOT have reloaded. Running part 2 of the test.");
+ alert("The page was reloaded on back, not from the page cache. Good job. Running part 2 of the test.");
nextTest();
return;
}
- alert("This page is https and has the no-store cache-control directive. It should go in to the page cache.");
+ alert("This page is https and has the no-store cache-control directive. It should NOT go in to the page cache.");
window.sessionStorage.https_in_page_cache_started = true;
setTimeout('window.location = "go-back.html"', 0);
Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (262989 => 262990)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-06-13 00:06:38 UTC (rev 262989)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-06-13 00:06:42 UTC (rev 262990)
@@ -1,5 +1,51 @@
2020-06-12 Alan Coon <alanc...@apple.com>
+ Cherry-pick r262978. rdar://problem/64315997
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
+ https://bugs.webkit.org/show_bug.cgi?id=213147
+ <rdar://problem/64249683>
+
+ Reviewed by Geoffrey Garen.
+
+ Source/WebCore:
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
+ This is a revert of r250437 due to push back from Web developers.
+
+ No new tests, updated existing tests.
+
+ * history/BackForwardCache.cpp:
+ (WebCore::canCacheFrame):
+
+ LayoutTests:
+
+ Update layout test coverage.
+
+ * http/tests/navigation/https-in-page-cache-expected.txt:
+ * http/tests/navigation/resources/https-in-page-cache-1.php:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-06-12 Chris Dumez <cdu...@apple.com>
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache
+ https://bugs.webkit.org/show_bug.cgi?id=213147
+ <rdar://problem/64249683>
+
+ Reviewed by Geoffrey Garen.
+
+ Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache.
+ This is a revert of r250437 due to push back from Web developers.
+
+ No new tests, updated existing tests.
+
+ * history/BackForwardCache.cpp:
+ (WebCore::canCacheFrame):
+
+2020-06-12 Alan Coon <alanc...@apple.com>
+
Cherry-pick r262707. rdar://problem/64226888
File URLs with hostnames are misleading
Modified: branches/safari-609-branch/Source/WebCore/history/BackForwardCache.cpp (262989 => 262990)
--- branches/safari-609-branch/Source/WebCore/history/BackForwardCache.cpp 2020-06-13 00:06:38 UTC (rev 262989)
+++ branches/safari-609-branch/Source/WebCore/history/BackForwardCache.cpp 2020-06-13 00:06:42 UTC (rev 262990)
@@ -140,6 +140,11 @@
logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasPluginsKey());
isCacheable = false;
}
+ if (frame.isMainFrame() && frame.document() && frame.document()->url().protocolIs("https") && documentLoader->response().cacheControlContainsNoStore()) {
+ PCLOG(" -Frame is HTTPS, and cache control prohibits storing");
+ logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::httpsNoStoreKey());
+ isCacheable = false;
+ }
if (frame.isMainFrame() && !frameLoader.history().currentItem()) {
PCLOG(" -Main frame has no current history item");
logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noCurrentHistoryItemKey());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes