Changeset 220903 in webkit


Ignore:
Timestamp:
Aug 18, 2017 12:22:13 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r220854.
https://bugs.webkit.org/show_bug.cgi?id=175716

I'm not sure we really need this (Requested by KaL on
#webkit).

Reverted changeset:

"[GTK][WPE] Add NTLM authentication enabled API"
https://bugs.webkit.org/show_bug.cgi?id=122952
http://trac.webkit.org/changeset/220854

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r220901 r220903  
     12017-08-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220854.
     4        https://bugs.webkit.org/show_bug.cgi?id=175716
     5
     6        I'm not sure we really need this (Requested by KaL on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[GTK][WPE] Add NTLM authentication enabled API"
     12        https://bugs.webkit.org/show_bug.cgi?id=122952
     13        http://trac.webkit.org/changeset/220854
     14
    1152017-08-17  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp

    r220854 r220903  
    4747
    4848static bool gIgnoreTLSErrors;
    49 static bool gInitialNTLMAuthenticationEnabled;
    5049static CString gInitialAcceptLanguages;
    5150static SoupNetworkProxySettings gProxySettings;
     
    147146    if (!gInitialAcceptLanguages.isNull())
    148147        setAcceptLanguages(gInitialAcceptLanguages);
    149 
    150     if (gInitialNTLMAuthenticationEnabled)
    151         soup_session_add_feature_by_type(m_soupSession.get(), SOUP_TYPE_AUTH_NTLM);
    152148
    153149#if SOUP_CHECK_VERSION(2, 53, 92)
     
    328324}
    329325
    330 void SoupNetworkSession::setInitialNTLMAuthenticationEnabled(bool enabled)
    331 {
    332     gInitialNTLMAuthenticationEnabled = enabled;
    333 }
    334 
    335 void SoupNetworkSession::setNTLMAuthenticationEnabled(bool enabled)
    336 {
    337     if (enabled)
    338         soup_session_add_feature_by_type(m_soupSession.get(), SOUP_TYPE_AUTH_NTLM);
    339     else
    340         soup_session_remove_feature_by_type(m_soupSession.get(), SOUP_TYPE_AUTH_NTLM);
    341 }
    342 
    343326} // namespace WebCore
    344327
  • trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h

    r220854 r220903  
    7171    void setupCustomProtocols();
    7272
    73     static void setInitialNTLMAuthenticationEnabled(bool);
    74     void setNTLMAuthenticationEnabled(bool);
    75 
    7673private:
    7774    void setupLogger();
  • trunk/Source/WebKit/ChangeLog

    r220895 r220903  
     12017-08-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220854.
     4        https://bugs.webkit.org/show_bug.cgi?id=175716
     5
     6        I'm not sure we really need this (Requested by KaL on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[GTK][WPE] Add NTLM authentication enabled API"
     12        https://bugs.webkit.org/show_bug.cgi?id=122952
     13        http://trac.webkit.org/changeset/220854
     14
    1152017-08-15  Megan Gardner  <megan_gardner@apple.com>
    216
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.h

    r220887 r220903  
    214214    void userPreferredLanguagesChanged(const Vector<String>&);
    215215    void setNetworkProxySettings(const WebCore::SoupNetworkProxySettings&);
    216     void setNTLMAuthenticationEnabled(bool);
    217216#endif
    218217
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in

    r220857 r220903  
    3232    UserPreferredLanguagesChanged(Vector<String> languages)
    3333    SetNetworkProxySettings(struct WebCore::SoupNetworkProxySettings settings)
    34     SetNTLMAuthenticationEnabled(bool enabled)
    3534#endif
    3635
  • trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp

    r220854 r220903  
    9191    encoder.encodeEnum(cookieAcceptPolicy);
    9292    encoder << ignoreTLSErrors;
    93     encoder << ntlmAuthenticationEnabled;
    9493    encoder << languages;
    9594    encoder << proxySettings;
     
    190189    if (!decoder.decode(result.ignoreTLSErrors))
    191190        return false;
    192     if (!decoder.decode(result.ntlmAuthenticationEnabled))
    193         return false;
    194191    if (!decoder.decode(result.languages))
    195192        return false;
  • trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h

    r220854 r220903  
    103103    HTTPCookieAcceptPolicy cookieAcceptPolicy { HTTPCookieAcceptPolicyAlways };
    104104    bool ignoreTLSErrors { false };
    105     bool ntlmAuthenticationEnabled { false };
    106105    Vector<String> languages;
    107106    WebCore::SoupNetworkProxySettings proxySettings;
  • trunk/Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp

    r220854 r220903  
    133133
    134134    setIgnoreTLSErrors(parameters.ignoreTLSErrors);
    135     setNTLMAuthenticationEnabled(parameters.ntlmAuthenticationEnabled);
    136135}
    137136
     
    148147{
    149148    SoupNetworkSession::allowSpecificHTTPSCertificateForHost(certificateInfo, host);
    150 }
    151 
    152 void NetworkProcess::setNTLMAuthenticationEnabled(bool enabled)
    153 {
    154     SoupNetworkSession::setInitialNTLMAuthenticationEnabled(enabled);
    155     NetworkStorageSession::forEach([enabled](const NetworkStorageSession& session) {
    156         if (auto* soupSession = session.soupNetworkSession())
    157             soupSession->setNTLMAuthenticationEnabled(enabled);
    158     });
    159149}
    160150
  • trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp

    r220854 r220903  
    15471547}
    15481548
    1549 /**
    1550  * webkit_web_context_get_ntlm_authentication_enabled:
    1551  * @context: a #WebKitWebContext
    1552  *
    1553  * Get whether NTLM authentication is currently enabled. By default, the feature
    1554  * is disabled, and you need to call webkit_web_context_set_ntlm_authentication_enabled()
    1555  * to enable it.
    1556  *
    1557  * Returns: %TRUE if NTLM authentication is enabled, or %FALSE otherwise.
    1558  *
    1559  * Since: 2.18
    1560  */
    1561 gboolean webkit_web_context_get_ntlm_authentication_enabled(WebKitWebContext* context)
    1562 {
    1563     g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), FALSE);
    1564 
    1565     return context->priv->processPool->ntlmAuthenticationEnabled();
    1566 }
    1567 
    1568 /**
    1569  * webkit_web_context_set_ntlm_authentication_enabled:
    1570  * @context: a #WebKitWebContext
    1571  * @enabled: Value to be set
    1572  *
    1573  * Enable or disable NTLM authentication.
    1574  *
    1575  * Since: 2.18
    1576  */
    1577 void webkit_web_context_set_ntlm_authentication_enabled(WebKitWebContext* context, gboolean enabled)
    1578 {
    1579     g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
    1580 
    1581     return context->priv->processPool->setNTLMAuthenticationEnabled(enabled);
    1582 }
    1583 
    15841549void webkitWebContextInitializeNotificationPermissions(WebKitWebContext* context)
    15851550{
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebContext.h

    r220854 r220903  
    307307                                                     GList                         *disallowed_origins);
    308308
    309 WEBKIT_API gboolean
    310 webkit_web_context_get_ntlm_authentication_enabled  (WebKitWebContext              *context);
    311 
    312 WEBKIT_API void
    313 webkit_web_context_set_ntlm_authentication_enabled  (WebKitWebContext              *context,
    314                                                      gboolean                       enabled);
    315 
    316309G_END_DECLS
    317310
  • trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt

    r220854 r220903  
    6767webkit_web_context_set_process_model
    6868webkit_web_context_initialize_notification_permissions
    69 webkit_web_context_get_ntlm_authentication_enabled
    70 webkit_web_context_set_ntlm_authentication_enabled
    7169
    7270<SUBSECTION URI Scheme>
  • trunk/Source/WebKit/UIProcess/API/wpe/WebKitWebContext.h

    r220854 r220903  
    307307                                                     GList                         *disallowed_origins);
    308308
    309 WEBKIT_API gboolean
    310 webkit_web_context_get_ntlm_authentication_enabled  (WebKitWebContext              *context);
    311 
    312 WEBKIT_API void
    313 webkit_web_context_set_ntlm_authentication_enabled  (WebKitWebContext              *context,
    314                                                      gboolean                       enabled);
    315 
    316309G_END_DECLS
    317310
  • trunk/Source/WebKit/UIProcess/WebProcessPool.h

    r220887 r220903  
    227227
    228228#if USE(SOUP)
    229     void setIgnoreTLSErrors(bool);
    230     bool ignoreTLSErrors() const { return m_ignoreTLSErrors; }
    231229    void setInitialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy) { m_initialHTTPCookieAcceptPolicy = policy; }
    232230    void setNetworkProxySettings(const WebCore::SoupNetworkProxySettings&);
    233     void setNTLMAuthenticationEnabled(bool);
    234     bool ntlmAuthenticationEnabled() const { return m_ntlmAuthenticationEnabled; }
    235231#endif
    236232    void setEnhancedAccessibility(bool);
     
    330326    static void willStartUsingPrivateBrowsing();
    331327    static void willStopUsingPrivateBrowsing();
     328
     329#if USE(SOUP)
     330    void setIgnoreTLSErrors(bool);
     331    bool ignoreTLSErrors() const { return m_ignoreTLSErrors; }
     332#endif
    332333
    333334    static void setInvalidMessageCallback(void (*)(WKStringRef));
     
    527528    HTTPCookieAcceptPolicy m_initialHTTPCookieAcceptPolicy { HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain };
    528529    WebCore::SoupNetworkProxySettings m_networkProxySettings;
    529     bool m_ignoreTLSErrors { true };
    530     bool m_ntlmAuthenticationEnabled { false };
    531530#endif
    532531    HashSet<String, ASCIICaseInsensitiveHash> m_urlSchemesRegisteredForCustomProtocols;
     
    556555    HashMap<uint64_t, RefPtr<DictionaryCallback>> m_dictionaryCallbacks;
    557556    HashMap<uint64_t, RefPtr<StatisticsRequest>> m_statisticsRequests;
     557
     558#if USE(SOUP)
     559    bool m_ignoreTLSErrors { true };
     560#endif
    558561
    559562    bool m_memoryCacheDisabled;
  • trunk/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp

    r220854 r220903  
    6262}
    6363
    64 void WebProcessPool::setNTLMAuthenticationEnabled(bool enabled)
    65 {
    66     if (m_ntlmAuthenticationEnabled == enabled)
    67         return;
    68 
    69     m_ntlmAuthenticationEnabled = enabled;
    70     if (m_networkProcess)
    71         m_networkProcess->send(Messages::NetworkProcess::SetNTLMAuthenticationEnabled(m_ntlmAuthenticationEnabled), 0);
    7264}
    73 
    74 }
  • trunk/Tools/ChangeLog

    r220902 r220903  
     12017-08-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r220854.
     4        https://bugs.webkit.org/show_bug.cgi?id=175716
     5
     6        I'm not sure we really need this (Requested by KaL on
     7        #webkit).
     8
     9        Reverted changeset:
     10
     11        "[GTK][WPE] Add NTLM authentication enabled API"
     12        https://bugs.webkit.org/show_bug.cgi?id=122952
     13        http://trac.webkit.org/changeset/220854
     14
    1152017-08-17  Michael Catanzaro  <mcatanzaro@igalia.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp

    r220854 r220903  
    251251    g_assert_cmpint(test->m_loadEvents[2], ==, LoadTrackingTest::LoadFinished);
    252252    g_assert_cmpstr(webkit_web_view_get_title(test->m_webView), ==, authExpectedSuccessTitle);
    253 }
    254 
    255 static void testWebViewAuthenticationNTLM(AuthenticationTest* test, gconstpointer)
    256 {
    257     // NTML is disabled by default.
    258     g_assert(!webkit_web_context_get_ntlm_authentication_enabled(test->m_webContext.get()));
    259     webkit_web_context_set_ntlm_authentication_enabled(test->m_webContext.get(), TRUE);
    260     g_assert(webkit_web_context_get_ntlm_authentication_enabled(test->m_webContext.get()));
    261 
    262     // FIXME: can we test NTLM authentication?
    263253}
    264254
     
    429419    AuthenticationTest::add("WebKitWebView", "authentication-storage", testWebViewAuthenticationStorage);
    430420    AuthenticationTest::add("WebKitWebView", "authentication-empty-realm", testWebViewAuthenticationEmptyRealm);
    431     AuthenticationTest::add("WebKitWebView", "authentication-ntlm", testWebViewAuthenticationNTLM);
    432421    ProxyAuthenticationTest::add("WebKitWebView", "authentication-proxy", testWebViewAuthenticationProxy);
    433422    ProxyAuthenticationTest::add("WebKitWebView", "authentication-proxy-https", testWebViewAuthenticationProxyHTTPS);
Note: See TracChangeset for help on using the changeset viewer.