- Revision
- 213125
- Author
- achristen...@apple.com
- Date
- 2017-02-28 00:28:33 -0800 (Tue, 28 Feb 2017)
Log Message
REGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=167967
Reviewed by Brady Eidson.
Source/WebCore:
XHR credentials have a persistence of CredentialPersistenceNone because we keep
them in the WebCore::CredentialStorage. We were storing them to CFNetwork's NSURLCredentialStorage
on iOS and then they were being given as the proposedCredential in
NetworkDataTaskCocoa::tryPasswordBasedAuthentication even though we set CredentialPersistenceNone.
This fixes http/tests/security/credentials-iframes.html
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set):
* platform/network/CredentialStorage.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
* platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
LayoutTests:
* platform/ios-simulator/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (213124 => 213125)
--- trunk/LayoutTests/ChangeLog 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/LayoutTests/ChangeLog 2017-02-28 08:28:33 UTC (rev 213125)
@@ -1,3 +1,12 @@
+2017-02-28 Alex Christensen <achristen...@webkit.org>
+
+ REGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on ios-simulator
+ https://bugs.webkit.org/show_bug.cgi?id=167967
+
+ Reviewed by Brady Eidson.
+
+ * platform/ios-simulator/TestExpectations:
+
2017-02-27 Antoine Quint <grao...@apple.com>
[Modern Media Controls] Use compact mode by default on macOS
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (213124 => 213125)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-02-28 08:28:33 UTC (rev 213125)
@@ -2869,8 +2869,6 @@
webkit.org/b/167619 css3/filters/backdrop/dynamic-with-clip-path.html [ ImageOnlyFailure ]
-webkit.org/b/167967 http/tests/security/credentials-iframes.html [ Failure ]
-
webkit.org/b/168054 compositing/masks/solid-color-masked.html [ ImageOnlyFailure ]
webkit.org/b/168215 imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (213124 => 213125)
--- trunk/Source/WebCore/ChangeLog 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/Source/WebCore/ChangeLog 2017-02-28 08:28:33 UTC (rev 213125)
@@ -1,3 +1,25 @@
+2017-02-28 Alex Christensen <achristen...@webkit.org>
+
+ REGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on ios-simulator
+ https://bugs.webkit.org/show_bug.cgi?id=167967
+
+ Reviewed by Brady Eidson.
+
+ XHR credentials have a persistence of CredentialPersistenceNone because we keep
+ them in the WebCore::CredentialStorage. We were storing them to CFNetwork's NSURLCredentialStorage
+ on iOS and then they were being given as the proposedCredential in
+ NetworkDataTaskCocoa::tryPasswordBasedAuthentication even though we set CredentialPersistenceNone.
+
+ This fixes http/tests/security/credentials-iframes.html
+
+ * platform/network/CredentialStorage.cpp:
+ (WebCore::CredentialStorage::set):
+ * platform/network/CredentialStorage.h:
+ * platform/network/cf/CredentialStorageCFNet.cpp:
+ (WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
+ * platform/network/mac/CredentialStorageMac.mm:
+ (WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
+
2017-02-27 Alex Christensen <achristen...@webkit.org>
Fix WinCairo build.
Modified: trunk/Source/WebCore/platform/network/CredentialStorage.cpp (213124 => 213125)
--- trunk/Source/WebCore/platform/network/CredentialStorage.cpp 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/Source/WebCore/platform/network/CredentialStorage.cpp 2017-02-28 08:28:33 UTC (rev 213125)
@@ -70,11 +70,6 @@
m_protectionSpaceToCredentialMap.set(std::make_pair(partitionName, protectionSpace), credential);
-#if PLATFORM(IOS)
- if (protectionSpace.authenticationScheme() != ProtectionSpaceAuthenticationSchemeClientCertificateRequested)
- saveToPersistentStorage(protectionSpace, credential);
-#endif
-
if (!protectionSpace.isProxy() && protectionSpace.authenticationScheme() != ProtectionSpaceAuthenticationSchemeClientCertificateRequested) {
m_originsWithCredentials.add(originStringFromURL(url));
Modified: trunk/Source/WebCore/platform/network/CredentialStorage.h (213124 => 213125)
--- trunk/Source/WebCore/platform/network/CredentialStorage.h 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/Source/WebCore/platform/network/CredentialStorage.h 2017-02-28 08:28:33 UTC (rev 213125)
@@ -52,10 +52,6 @@
WEBCORE_EXPORT void clearCredentials();
-#if PLATFORM(IOS)
- void saveToPersistentStorage(const ProtectionSpace&, const Credential&);
-#endif
-
// These methods work for authentication schemes that support sending credentials without waiting for a request. E.g., for HTTP Basic authentication scheme
// a client should assume that all paths at or deeper than the depth of a known protected resource share are within the same protection space.
WEBCORE_EXPORT bool set(const String&, const Credential&, const URL&); // Returns true if the URL corresponds to a known protection space, so credentials could be updated.
Modified: trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp (213124 => 213125)
--- trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp 2017-02-28 08:28:33 UTC (rev 213125)
@@ -64,19 +64,6 @@
#endif
}
-#if PLATFORM(IOS)
-void CredentialStorage::saveToPersistentStorage(const ProtectionSpace& protectionSpace, const Credential& credential)
-{
- RetainPtr<CFURLCredentialStorageRef> storageCF = adoptCF(CFURLCredentialStorageCreate(0));
-
- if (credential.persistence() == CredentialPersistenceNone) {
- Credential sessionCredential(credential, CredentialPersistenceForSession);
- CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), sessionCredential.cfCredential(), protectionSpace.cfSpace());
- } else
- CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), credential.cfCredential(), protectionSpace.cfSpace());
-}
-#endif
-
} // namespace WebCore
#endif // USE(CFURLCONNECTION)
Modified: trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm (213124 => 213125)
--- trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm 2017-02-28 07:39:59 UTC (rev 213124)
+++ trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm 2017-02-28 08:28:33 UTC (rev 213125)
@@ -40,17 +40,6 @@
return credential ? Credential(credential) : Credential();
}
-#if PLATFORM(IOS)
-void CredentialStorage::saveToPersistentStorage(const ProtectionSpace& protectionSpace, const Credential& credential)
-{
- if (credential.persistence() == CredentialPersistenceNone) {
- Credential sessionCredential(credential, CredentialPersistenceForSession);
- [[NSURLCredentialStorage sharedCredentialStorage] setDefaultCredential:sessionCredential.nsCredential() forProtectionSpace:protectionSpace.nsSpace()];
- } else
- [[NSURLCredentialStorage sharedCredentialStorage] setDefaultCredential:credential.nsCredential() forProtectionSpace:protectionSpace.nsSpace()];
-}
-#endif
-
} // namespace WebCore
#endif // !USE(CFURLCONNECTION)