⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 99800 in webkit


Ignore:
Timestamp:
Nov 9, 2011, 6:48:40 PM (15 years ago)
Author:
ap@apple.com
Message:

<rdar://problem/10423024> WebProcess doesn't use AuthBrokerAgent for proxy credentials
https://bugs.webkit.org/show_bug.cgi?id=71964

Reviewed by Darin Adler.

Source/WebCore:

  • platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
  • platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):

Don't ask the client for proxy credentials. CFNetwork results are authoritative, and proxy
credentials are system-wide.

Source/WebKit2:

  • WebProcess/com.apple.WebProcess.sb: Allow mach-lookup of com.apple.cfnetwork.AuthBrokerAgent.
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99799 r99800  
     12011-11-09  Alexey Proskuryakov  <ap@apple.com>
     2
     3        <rdar://problem/10423024> WebProcess doesn't use AuthBrokerAgent for proxy credentials
     4        https://bugs.webkit.org/show_bug.cgi?id=71964
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
     9        * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
     10        Don't ask the client for proxy credentials. CFNetwork results are authoritative, and proxy
     11        credentials are system-wide.
     12
    1132011-11-09  Daniel Sievers  <sievers@chromium.org>
    214
  • trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp

    r96547 r99800  
    578578    ASSERT(challenge.authenticationClient() == this); // Should be already set.
    579579
     580#if !PLATFORM(WIN)
     581    // Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
     582    // CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
     583    if (challenge.protectionSpace().isProxy()) {
     584        // Cannot use receivedRequestToContinueWithoutCredential(), because current challenge is not yet set.
     585        CFURLConnectionUseCredential(d->m_connection.get(), 0, challenge.cfURLAuthChallengeRef());
     586        return;
     587    }
     588#endif
     589
    580590    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
    581591        RetainPtr<CFStringRef> user(AdoptCF, d->m_user.createCFString());
  • trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm

    r95120 r99800  
    525525    ASSERT(challenge.nsURLAuthenticationChallenge());
    526526
     527#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOWLEOPARD)
     528    // Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
     529    // CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
     530    if (challenge.protectionSpace().isProxy()) {
     531        // Cannot use receivedRequestToContinueWithoutCredential(), because current challenge is not yet set.
     532        [challenge.sender() continueWithoutCredentialForAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
     533        return;
     534    }
     535#endif
     536
    527537    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
    528538        NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:d->m_user
     
    565575    d->m_currentWebChallenge.setAuthenticationClient(this);
    566576
     577    // FIXME: Several concurrent requests can return with the an authentication challenge for the same protection space.
     578    // We should avoid making additional client calls for the same protection space when already waiting for the user,
     579    // because typing the same credentials several times is annoying.
    567580    if (client())
    568581        client()->didReceiveAuthenticationChallenge(this, d->m_currentWebChallenge);
  • trunk/Source/WebKit2/ChangeLog

    r99778 r99800  
     12011-11-09  Alexey Proskuryakov  <ap@apple.com>
     2
     3        <rdar://problem/10423024> WebProcess doesn't use AuthBrokerAgent for proxy credentials
     4        https://bugs.webkit.org/show_bug.cgi?id=71964
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebProcess/com.apple.WebProcess.sb: Allow mach-lookup of com.apple.cfnetwork.AuthBrokerAgent.
     9
    1102011-11-09  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb

    r99483 r99800  
    168168       (global-name "com.apple.windowserver.active")
    169169
     170        ;; FIXME: This will be superfluous once <rdar://problem/10420555> is fixed.
     171       (global-name "com.apple.cfnetwork.AuthBrokerAgent")
     172
    170173       ;; FIXME: This should be removed when <rdar://problem/9276393> is fixed.
    171174       (global-name "com.apple.metadata.mds"))
Note: See TracChangeset for help on using the changeset viewer.