Title: [223993] trunk/Source/WebKit
- Revision
- 223993
- Author
- [email protected]
- Date
- 2017-10-25 16:24:15 -0700 (Wed, 25 Oct 2017)
Log Message
Network process crash under WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge.
https://bugs.webkit.org/show_bug.cgi?id=160234
rdar://problem/30675510
Reviewed by Geoffrey Garen.
An exception is raised because we call the method rejectProtectionSpaceAndContinueWithChallenge on the CFNetwork
challenge sender, which does not implement this optional method. The methods on the authentication challenge
sender are deprecated when network session is used, so we should not call them in that case.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/Authentication/soup/AuthenticationManagerSoup.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (223992 => 223993)
--- trunk/Source/WebKit/ChangeLog 2017-10-25 23:21:38 UTC (rev 223992)
+++ trunk/Source/WebKit/ChangeLog 2017-10-25 23:24:15 UTC (rev 223993)
@@ -1,3 +1,29 @@
+2017-10-25 Per Arne Vollan <[email protected]>
+
+ Network process crash under WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge.
+ https://bugs.webkit.org/show_bug.cgi?id=160234
+ rdar://problem/30675510
+
+ Reviewed by Geoffrey Garen.
+
+ An exception is raised because we call the method rejectProtectionSpaceAndContinueWithChallenge on the CFNetwork
+ challenge sender, which does not implement this optional method. The methods on the authentication challenge
+ sender are deprecated when network session is used, so we should not call them in that case.
+
+ * Shared/Authentication/AuthenticationManager.cpp:
+ (WebKit::AuthenticationManager::useCredentialForSingleChallenge):
+ (WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
+ (WebKit::AuthenticationManager::cancelSingleChallenge):
+ (WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
+ (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
+ * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
+ (WebKit::AuthenticationManager::receivedCredential):
+ (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+ (WebKit::AuthenticationManager::receivedCancellation):
+ (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+ (WebKit::AuthenticationManager::receivedChallengeRejection):
+ * Shared/Authentication/soup/AuthenticationManagerSoup.cpp:
+
2017-10-25 Youenn Fablet <[email protected]>
Move DNS resolution outside of NetworkRTCProvider
Modified: trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (223992 => 223993)
--- trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2017-10-25 23:21:38 UTC (rev 223992)
+++ trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2017-10-25 23:24:15 UTC (rev 223993)
@@ -226,12 +226,15 @@
completionHandler(AuthenticationChallengeDisposition::UseCredential, credential);
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedCredential(challenge.challenge, credential);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedCredential(challenge.challenge, credential);
+#endif
}
void AuthenticationManager::continueWithoutCredentialForChallenge(uint64_t challengeID)
@@ -254,12 +257,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::UseCredential, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedRequestToContinueWithoutCredential(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedRequestToContinueWithoutCredential(challenge.challenge);
+#endif
}
void AuthenticationManager::cancelChallenge(uint64_t challengeID)
@@ -282,12 +288,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::Cancel, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedCancellation(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedCancellation(challenge.challenge);
+#endif
}
void AuthenticationManager::performDefaultHandling(uint64_t challengeID)
@@ -310,12 +319,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedRequestToPerformDefaultHandling(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedRequestToPerformDefaultHandling(challenge.challenge);
+#endif
}
void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID)
@@ -338,12 +350,15 @@
challenge.completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, Credential());
return;
}
+ ASSERT(coreClient);
#endif
if (coreClient)
coreClient->receivedChallengeRejection(challenge.challenge);
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
else
receivedChallengeRejection(challenge.challenge);
+#endif
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm (223992 => 223993)
--- trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm 2017-10-25 23:21:38 UTC (rev 223992)
+++ trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm 2017-10-25 23:24:15 UTC (rev 223993)
@@ -26,6 +26,7 @@
#import "config.h"
#import "AuthenticationManager.h"
+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
using namespace WebCore;
namespace WebKit {
@@ -32,37 +33,28 @@
void AuthenticationManager::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
{
-#if !USE(CFURLCONNECTION)
[authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
-#endif
}
}
+#endif
Modified: trunk/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp (223992 => 223993)
--- trunk/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp 2017-10-25 23:21:38 UTC (rev 223992)
+++ trunk/Source/WebKit/Shared/Authentication/soup/AuthenticationManagerSoup.cpp 2017-10-25 23:24:15 UTC (rev 223993)
@@ -26,6 +26,7 @@
#include "config.h"
#include "AuthenticationManager.h"
+#if !USE(NETWORK_SESSION)
using namespace WebCore;
namespace WebKit {
@@ -51,3 +52,4 @@
}
}
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes