Title: [272388] branches/safari-612.1.2-branch/Source/WebKit
- Revision
- 272388
- Author
- alanc...@apple.com
- Date
- 2021-02-04 14:25:48 -0800 (Thu, 04 Feb 2021)
Log Message
Cherry-pick r272229. rdar://problem/73997275
REGRESSION(r271744): Broke Microsoft live login in internal builds
https://bugs.webkit.org/show_bug.cgi?id=221271
<rdar://problem/73848416>
Reviewed by Alex Christensen.
If a user goes straight to login.live.com without first visiting
microsoft.com, we crash when checking for storage access because
we assume the user has interacted with the page. Since this is a
quirked flow, we should not assume that, and should insert the
domain into the database.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.2-branch/Source/WebKit/ChangeLog (272387 => 272388)
--- branches/safari-612.1.2-branch/Source/WebKit/ChangeLog 2021-02-04 22:24:10 UTC (rev 272387)
+++ branches/safari-612.1.2-branch/Source/WebKit/ChangeLog 2021-02-04 22:25:48 UTC (rev 272388)
@@ -1,3 +1,46 @@
+2021-02-04 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r272229. rdar://problem/73997275
+
+ REGRESSION(r271744): Broke Microsoft live login in internal builds
+ https://bugs.webkit.org/show_bug.cgi?id=221271
+ <rdar://problem/73848416>
+
+ Reviewed by Alex Christensen.
+
+ If a user goes straight to login.live.com without first visiting
+ microsoft.com, we crash when checking for storage access because
+ we assume the user has interacted with the page. Since this is a
+ quirked flow, we should not assume that, and should insert the
+ domain into the database.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-02 Kate Cheney <katherine_che...@apple.com>
+
+ REGRESSION(r271744): Broke Microsoft live login in internal builds
+ https://bugs.webkit.org/show_bug.cgi?id=221271
+ <rdar://problem/73848416>
+
+ Reviewed by Alex Christensen.
+
+ If a user goes straight to login.live.com without first visiting
+ microsoft.com, we crash when checking for storage access because
+ we assume the user has interacted with the page. Since this is a
+ quirked flow, we should not assume that, and should insert the
+ domain into the database.
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt const): Deleted.
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
+
2021-02-01 Carlos Garcia Campos <cgar...@igalia.com>
[SOUP] Add support for data URLs in the network process
Modified: branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (272387 => 272388)
--- branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-02-04 22:24:10 UTC (rev 272387)
+++ branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2021-02-04 22:25:48 UTC (rev 272388)
@@ -2118,12 +2118,18 @@
return CookieAccess::OnlyIfGranted;
}
-StorageAccessPromptWasShown ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt(unsigned requestingDomainID, const RegistrableDomain& firstPartyDomain) const
+StorageAccessPromptWasShown ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt(unsigned requestingDomainID, const RegistrableDomain& firstPartyDomain)
{
ASSERT(!RunLoop::isMain());
- auto firstPartyPrimaryDomainID = domainID(firstPartyDomain).value();
+ auto result = ensureResourceStatisticsForRegistrableDomain(firstPartyDomain);
+ if (!result.second) {
+ RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt was not completed due to failed insert attempt", this);
+ return StorageAccessPromptWasShown::No;
+ }
+ auto firstPartyPrimaryDomainID = *result.second;
+
SQLiteStatement statement(m_database, "SELECT COUNT(*) FROM StorageAccessUnderTopFrameDomains WHERE domainID = ? AND topLevelDomainID = ?");
if (statement.prepare() != SQLITE_OK
|| statement.bindInt(1, requestingDomainID) != SQLITE_OK
Modified: branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h (272387 => 272388)
--- branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-02-04 22:24:10 UTC (rev 272387)
+++ branches/safari-612.1.2-branch/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h 2021-02-04 22:25:48 UTC (rev 272388)
@@ -193,7 +193,7 @@
Vector<DomainData> domains() const;
bool hasHadUnexpiredRecentUserInteraction(const DomainData&, OperatingDatesWindow);
void clearGrandfathering(Vector<unsigned>&&);
- WebCore::StorageAccessPromptWasShown hasUserGrantedStorageAccessThroughPrompt(unsigned domainID, const RegistrableDomain&) const;
+ WebCore::StorageAccessPromptWasShown hasUserGrantedStorageAccessThroughPrompt(unsigned domainID, const RegistrableDomain&);
void incrementRecordsDeletedCountForDomains(HashSet<RegistrableDomain>&&) override;
void reclassifyResources();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes