Changeset 222706 in webkit


Ignore:
Timestamp:
Oct 2, 2017 5:55:12 AM (7 years ago)
Author:
tpopela@redhat.com
Message:

[SOUP] Default kerberos authentication credentials are used in ephemeral (private) mode
https://bugs.webkit.org/show_bug.cgi?id=177738

Reviewed by Carlos Garcia Campos.

If the session is ephemeral then don't enable the Negotiate support in
our SoupSession.

  • platform/network/soup/NetworkStorageSessionSoup.cpp: Pass the

session ID if it's known to the SoupNetworkSession.
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const):

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): If the session is
ephemeral (based on given session ID) then don't activate the
Negotiate support in SoupSession.

  • platform/network/soup/SoupNetworkSession.h:

Change the constructor to accept the PAL::SessionID with the default
value set to PAL::SessionID::emptySessionID.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r222705 r222706  
     12017-10-02  Tomas Popela  <tpopela@redhat.com>
     2
     3        [SOUP] Default kerberos authentication credentials are used in ephemeral (private) mode
     4        https://bugs.webkit.org/show_bug.cgi?id=177738
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        If the session is ephemeral then don't enable the Negotiate support in
     9        our SoupSession.
     10
     11        * platform/network/soup/NetworkStorageSessionSoup.cpp: Pass the
     12        session ID if it's known to the SoupNetworkSession.
     13        (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
     14        (WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const):
     15        * platform/network/soup/SoupNetworkSession.cpp:
     16        (WebCore::SoupNetworkSession::SoupNetworkSession): If the session is
     17        ephemeral (based on given session ID) then don't activate the
     18        Negotiate support in SoupSession.
     19        * platform/network/soup/SoupNetworkSession.h:
     20        Change the constructor to accept the PAL::SessionID with the default
     21        value set to PAL::SessionID::emptySessionID.
     22
    1232017-10-02  Joanmarie Diggs  <jdiggs@igalia.com>
    224
  • trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp

    r220857 r222706  
    8484    ASSERT(sessionID != PAL::SessionID::defaultSessionID());
    8585    ASSERT(!globalSessionMap().contains(sessionID));
    86     globalSessionMap().add(sessionID, std::make_unique<NetworkStorageSession>(sessionID, std::make_unique<SoupNetworkSession>()));
     86    globalSessionMap().add(sessionID, std::make_unique<NetworkStorageSession>(sessionID, std::make_unique<SoupNetworkSession>(sessionID)));
    8787}
    8888
     
    100100{
    101101    if (!m_session)
    102         m_session = std::make_unique<SoupNetworkSession>(m_cookieStorage.get());
     102        m_session = std::make_unique<SoupNetworkSession>(m_sessionID, m_cookieStorage.get());
    103103    return *m_session;
    104104}
  • trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp

    r220903 r222706  
    114114#endif
    115115
    116 SoupNetworkSession::SoupNetworkSession(SoupCookieJar* cookieJar)
     116SoupNetworkSession::SoupNetworkSession(PAL::SessionID sessionID, SoupCookieJar* cookieJar)
    117117    : m_soupSession(adoptGRef(soup_session_async_new()))
    118118{
     
    148148
    149149#if SOUP_CHECK_VERSION(2, 53, 92)
    150     if (soup_auth_negotiate_supported()) {
     150    if (soup_auth_negotiate_supported() && !sessionID.isEphemeral()) {
    151151        g_object_set(m_soupSession.get(),
    152152            SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_NEGOTIATE,
  • trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h

    r220903 r222706  
    2828
    2929#include <glib-object.h>
     30#include <pal/SessionID.h>
    3031#include <wtf/Function.h>
    3132#include <wtf/Noncopyable.h>
     
    4849    WTF_MAKE_NONCOPYABLE(SoupNetworkSession); WTF_MAKE_FAST_ALLOCATED;
    4950public:
    50     explicit SoupNetworkSession(SoupCookieJar* = nullptr);
     51    explicit SoupNetworkSession(PAL::SessionID = PAL::SessionID::defaultSessionID(), SoupCookieJar* = nullptr);
    5152    ~SoupNetworkSession();
    5253
Note: See TracChangeset for help on using the changeset viewer.