Title: [244255] branches/safari-607-branch/Source/WebKit
Revision
244255
Author
[email protected]
Date
2019-04-15 00:15:29 -0700 (Mon, 15 Apr 2019)

Log Message

Cherry-pick r243487. rdar://problem/49788895

    Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
    https://bugs.webkit.org/show_bug.cgi?id=196213

    Patch by Alex Christensen <[email protected]> on 2019-03-25
    Reviewed by Geoff Garen.

    Source/WebKit:

    A release assertion added in r230225 was reachable.  I reached it in a unit test that responds to a challenge
    with a SecIdentityRef wrapped in an NSCredential.

    * Shared/cf/ArgumentCodersCF.cpp:
    (IPC::decode):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (244254 => 244255)


--- branches/safari-607-branch/Source/WebKit/ChangeLog	2019-04-15 07:15:24 UTC (rev 244254)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog	2019-04-15 07:15:29 UTC (rev 244255)
@@ -1,3 +1,45 @@
+2019-04-14  Babak Shafiei  <[email protected]>
+
+        Cherry-pick r243487. rdar://problem/49788895
+
+    Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
+    https://bugs.webkit.org/show_bug.cgi?id=196213
+    
+    Patch by Alex Christensen <[email protected]> on 2019-03-25
+    Reviewed by Geoff Garen.
+    
+    Source/WebKit:
+    
+    A release assertion added in r230225 was reachable.  I reached it in a unit test that responds to a challenge
+    with a SecIdentityRef wrapped in an NSCredential.
+    
+    * Shared/cf/ArgumentCodersCF.cpp:
+    (IPC::decode):
+    
+    Tools:
+    
+    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+    * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm: Added.
+    (credentialWithIdentityAndKeychainPath):
+    (-[ChallengeDelegate webView:didFinishNavigation:]):
+    (-[ChallengeDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
+    (TestWebKitAPI::TEST):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-03-25  Alex Christensen  <[email protected]>
+
+            Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
+            https://bugs.webkit.org/show_bug.cgi?id=196213
+
+            Reviewed by Geoff Garen.
+
+            A release assertion added in r230225 was reachable.  I reached it in a unit test that responds to a challenge
+            with a SecIdentityRef wrapped in an NSCredential.
+
+            * Shared/cf/ArgumentCodersCF.cpp:
+            (IPC::decode):
+
 2019-04-11  Kocsen Chung  <[email protected]>
 
         Revert r244165. rdar://problem/49788895

Modified: branches/safari-607-branch/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp (244254 => 244255)


--- branches/safari-607-branch/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp	2019-04-15 07:15:24 UTC (rev 244254)
+++ branches/safari-607-branch/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp	2019-04-15 07:15:29 UTC (rev 244255)
@@ -705,10 +705,6 @@
 
 bool decode(Decoder& decoder, RetainPtr<SecIdentityRef>& result)
 {
-#if PLATFORM(COCOA)
-    RELEASE_ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessCredentials));
-#endif
-
     RetainPtr<SecCertificateRef> certificate;
     if (!decode(decoder, certificate))
         return false;
@@ -724,6 +720,11 @@
     if (!decode(decoder, keyData))
         return false;
 
+#if PLATFORM(COCOA)
+    if (!hasProcessPrivilege(ProcessPrivilege::CanAccessCredentials))
+        return true;
+#endif
+
     SecKeyRef key = nullptr;
 #if PLATFORM(IOS_FAMILY)
     if (secKeyRefDecodingAllowed)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to