Title: [222706] trunk/Source/WebCore
- Revision
- 222706
- Author
- [email protected]
- Date
- 2017-10-02 05:55:12 -0700 (Mon, 02 Oct 2017)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222705 => 222706)
--- trunk/Source/WebCore/ChangeLog 2017-10-02 12:17:24 UTC (rev 222705)
+++ trunk/Source/WebCore/ChangeLog 2017-10-02 12:55:12 UTC (rev 222706)
@@ -1,3 +1,25 @@
+2017-10-02 Tomas Popela <[email protected]>
+
+ [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.
+
2017-10-02 Joanmarie Diggs <[email protected]>
REGRESSION(r222640) [GTK] Build broken with ATK 2.14
Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (222705 => 222706)
--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2017-10-02 12:17:24 UTC (rev 222705)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2017-10-02 12:55:12 UTC (rev 222706)
@@ -83,7 +83,7 @@
{
ASSERT(sessionID != PAL::SessionID::defaultSessionID());
ASSERT(!globalSessionMap().contains(sessionID));
- globalSessionMap().add(sessionID, std::make_unique<NetworkStorageSession>(sessionID, std::make_unique<SoupNetworkSession>()));
+ globalSessionMap().add(sessionID, std::make_unique<NetworkStorageSession>(sessionID, std::make_unique<SoupNetworkSession>(sessionID)));
}
void NetworkStorageSession::ensureSession(PAL::SessionID, const String&)
@@ -99,7 +99,7 @@
SoupNetworkSession& NetworkStorageSession::getOrCreateSoupNetworkSession() const
{
if (!m_session)
- m_session = std::make_unique<SoupNetworkSession>(m_cookieStorage.get());
+ m_session = std::make_unique<SoupNetworkSession>(m_sessionID, m_cookieStorage.get());
return *m_session;
}
Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp (222705 => 222706)
--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp 2017-10-02 12:17:24 UTC (rev 222705)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp 2017-10-02 12:55:12 UTC (rev 222706)
@@ -113,7 +113,7 @@
}
#endif
-SoupNetworkSession::SoupNetworkSession(SoupCookieJar* cookieJar)
+SoupNetworkSession::SoupNetworkSession(PAL::SessionID sessionID, SoupCookieJar* cookieJar)
: m_soupSession(adoptGRef(soup_session_async_new()))
{
// Values taken from http://www.browserscope.org/ following
@@ -147,7 +147,7 @@
setAcceptLanguages(gInitialAcceptLanguages);
#if SOUP_CHECK_VERSION(2, 53, 92)
- if (soup_auth_negotiate_supported()) {
+ if (soup_auth_negotiate_supported() && !sessionID.isEphemeral()) {
g_object_set(m_soupSession.get(),
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_NEGOTIATE,
nullptr);
Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h (222705 => 222706)
--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h 2017-10-02 12:17:24 UTC (rev 222705)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h 2017-10-02 12:55:12 UTC (rev 222706)
@@ -27,6 +27,7 @@
#define SoupNetworkSession_h
#include <glib-object.h>
+#include <pal/SessionID.h>
#include <wtf/Function.h>
#include <wtf/Noncopyable.h>
#include <wtf/glib/GRefPtr.h>
@@ -47,7 +48,7 @@
class SoupNetworkSession {
WTF_MAKE_NONCOPYABLE(SoupNetworkSession); WTF_MAKE_FAST_ALLOCATED;
public:
- explicit SoupNetworkSession(SoupCookieJar* = nullptr);
+ explicit SoupNetworkSession(PAL::SessionID = PAL::SessionID::defaultSessionID(), SoupCookieJar* = nullptr);
~SoupNetworkSession();
SoupSession* soupSession() const { return m_soupSession.get(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes