[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

mitz at apple.com mitz at apple.com
Fri Jan 21 14:41:42 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 9d4740202042d322b2a3c8b95f33a3f620bf4c0c
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 24 20:24:37 2010 +0000

    <rdar://problem/8758386> The web process uses its own credential storage
    https://bugs.webkit.org/show_bug.cgi?id=51599
    
    Reviewed by Anders Carlsson.
    
    WebCore:
    
    * WebCore.exp.in: Export CredentialStorage::getFromPersistentStorage(), Credential::hasPassword(),
    and Credential::isEmpty().
    
    WebKit2:
    
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Try to answer the challenge using
    the UI process’s credential storage first.
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Prevent the web process from using
    its own credential storage.
    * WebProcess/mac/WebProcessMainMac.mm:
    (WebKit::WebProcessMain): Ditto.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74648 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9c2be1b..d75280a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-24  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/8758386> The web process uses its own credential storage
+        https://bugs.webkit.org/show_bug.cgi?id=51599
+
+        * WebCore.exp.in: Export CredentialStorage::getFromPersistentStorage(), Credential::hasPassword(),
+        and Credential::isEmpty().
+
 2010-12-24  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 593bc60..0bc453d 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -435,6 +435,7 @@ __ZN7WebCore16enclosingIntRectERK7_NSRect
 __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE
 __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
 __ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERNS0_9WeakGCMapIPN3WTF10StringImplEPNS0_8JSStringEEES6_
+__ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE
 __ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE
 __ZN7WebCore17DOMImplementation13isXMLMIMETypeERKN3WTF6StringE
 __ZN7WebCore17DOMImplementation14isTextMIMETypeERKN3WTF6StringE
@@ -933,8 +934,10 @@ __ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorE
 __ZN7WebCore9toElementEN3JSC7JSValueE
 __ZNK3JSC8Bindings10RootObject12globalObjectEv
 __ZNK3WTF6String14createCFStringEv
+__ZNK7WebCore10Credential11hasPasswordEv
 __ZNK7WebCore10Credential11persistenceEv
 __ZNK7WebCore10Credential4userEv
+__ZNK7WebCore10Credential7isEmptyEv
 __ZNK7WebCore10Credential8passwordEv
 __ZNK7WebCore10FloatPointcv8_NSPointEv
 __ZNK7WebCore10PluginData16supportsMimeTypeERKN3WTF6StringE
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 5a6f9b7..1daaf8a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-24  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        <rdar://problem/8758386> The web process uses its own credential storage
+        https://bugs.webkit.org/show_bug.cgi?id=51599
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): Try to answer the challenge using
+        the UI process’s credential storage first.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Prevent the web process from using
+        its own credential storage.
+        * WebProcess/mac/WebProcessMainMac.mm:
+        (WebKit::WebProcessMain): Ditto.
+
 2010-12-23  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index dbc9170..24b5a9d 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -27,6 +27,7 @@
 
 #include "AuthenticationChallengeProxy.h"
 #include "AuthenticationDecisionListener.h"
+#include "AuthenticationManagerMessages.h"
 #include "DataReference.h"
 #include "DrawingAreaProxy.h"
 #include "FindIndicator.h"
@@ -61,6 +62,7 @@
 #include "WebProtectionSpace.h"
 #include "WebSecurityOrigin.h"
 #include "WebURLRequest.h"
+#include <WebCore/CredentialStorage.h>
 #include <WebCore/FloatRect.h>
 #include <WebCore/MIMETypeRegistry.h>
 #include <WebCore/WindowFeatures.h>
@@ -1982,6 +1984,14 @@ void WebPageProxy::didReceiveAuthenticationChallenge(uint64_t frameID, const Web
     WebFrameProxy* frame = process()->webFrame(frameID);
     MESSAGE_CHECK(frame);
 
+    if (!coreChallenge.previousFailureCount()) {
+        Credential defaultCredential = CredentialStorage::getFromPersistentStorage(coreChallenge.protectionSpace());
+        if (!defaultCredential.isEmpty() && defaultCredential.hasPassword() && !defaultCredential.password().isEmpty()) {
+            process()->send(Messages::AuthenticationManager::UseCredentialForChallenge(challengeID, defaultCredential), pageID());
+            return;
+        }
+    }
+
     RefPtr<AuthenticationChallengeProxy> authenticationChallenge = AuthenticationChallengeProxy::create(coreChallenge, challengeID, this);
     
     m_loaderClient.didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index be10517..3306b46 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -161,7 +161,7 @@ void WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader*, unsigned lon
 
 bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier)
 {
-    return true;
+    return false;
 }
 
 void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge& challenge)
diff --git a/WebKit2/WebProcess/mac/WebProcessMainMac.mm b/WebKit2/WebProcess/mac/WebProcessMainMac.mm
index 2f455f4..4d84d8a 100644
--- a/WebKit2/WebProcess/mac/WebProcessMainMac.mm
+++ b/WebKit2/WebProcess/mac/WebProcessMainMac.mm
@@ -104,6 +104,9 @@ int WebProcessMain(const CommandLine& commandLine)
         return 2;
     }
 
+    // Disallow access to the user keychain.
+    SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem);
+
 #if !SHOW_CRASH_REPORTER
     // Installs signal handlers that exit on a crash so that CrashReporter does not show up.
     signal(SIGILL, _exit);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list