From baf4531dfbe160a938d4484c25888b8aab0a9a38 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 05:43:12 +0000 Subject: import libsoup-2.48.1-6.el7 --- diff --git a/SOURCES/rh1302366-nul-in-headers.patch b/SOURCES/rh1302366-nul-in-headers.patch new file mode 100644 index 0000000..3f4feba --- /dev/null +++ b/SOURCES/rh1302366-nul-in-headers.patch @@ -0,0 +1,143 @@ +diff -up libsoup-2.48.1/libsoup/soup-headers.c.nul-in-headers libsoup-2.48.1/libsoup/soup-headers.c +--- libsoup-2.48.1/libsoup/soup-headers.c.nul-in-headers 2014-11-30 16:32:58.000000000 +0100 ++++ libsoup-2.48.1/libsoup/soup-headers.c 2016-04-13 09:05:32.947147115 +0200 +@@ -35,17 +35,12 @@ soup_headers_parse (const char *str, int + const char *headers_start; + char *headers_copy, *name, *name_end, *value, *value_end; + char *eol, *sol, *p; ++ gsize copy_len; + gboolean success = FALSE; + + g_return_val_if_fail (str != NULL, FALSE); + g_return_val_if_fail (dest != NULL, FALSE); + +- /* RFC 2616 does allow NUL bytes in the headers, but httpbis +- * is changing that, and we can't deal with them anyway. +- */ +- if (memchr (str, '\0', len)) +- return FALSE; +- + /* As per RFC 2616 section 19.3, we treat '\n' as the + * line terminator, and '\r', if it appears, merely as + * ignorable trailing whitespace. +@@ -55,14 +50,28 @@ soup_headers_parse (const char *str, int + headers_start = memchr (str, '\n', len); + if (!headers_start) + return FALSE; ++ /* No '\0's in the Request-Line / Status-Line */ ++ if (memchr (str, '\0', headers_start - str)) ++ return FALSE; + + /* We work on a copy of the headers, which we can write '\0's + * into, so that we don't have to individually g_strndup and + * then g_free each header name and value. + */ +- headers_copy = g_strndup (headers_start, len - (headers_start - str)); ++ copy_len = len - (headers_start - str); ++ headers_copy = g_malloc (copy_len + 1); ++ memcpy (headers_copy, headers_start, copy_len); ++ headers_copy[copy_len] = '\0'; + value_end = headers_copy; + ++ /* There shouldn't be any '\0's in the headers already, but ++ * this is the web we're talking about. ++ */ ++ while ((p = memchr (headers_copy, '\0', copy_len))) { ++ memmove (p, p + 1, copy_len - (p - headers_copy)); ++ copy_len--; ++ } ++ + while (*(value_end + 1)) { + name = value_end + 1; + name_end = strchr (name, ':'); +diff -up libsoup-2.48.1/tests/header-parsing.c.nul-in-headers libsoup-2.48.1/tests/header-parsing.c +--- libsoup-2.48.1/tests/header-parsing.c.nul-in-headers 2014-12-07 15:55:22.000000000 +0100 ++++ libsoup-2.48.1/tests/header-parsing.c 2016-04-13 09:09:15.631137526 +0200 +@@ -358,6 +358,24 @@ static struct RequestTest { + } + }, + ++ { "NUL in header name", "760832", ++ "GET / HTTP/1.1\r\nHost\x00: example.com\r\n", 36, ++ SOUP_STATUS_OK, ++ "GET", "/", SOUP_HTTP_1_1, ++ { { "Host", "example.com" }, ++ { NULL } ++ } ++ }, ++ ++ { "NUL in header value", "760832", ++ "GET / HTTP/1.1\r\nHost: example\x00" "com\r\n", 35, ++ SOUP_STATUS_OK, ++ "GET", "/", SOUP_HTTP_1_1, ++ { { "Host", "examplecom" }, ++ { NULL } ++ } ++ }, ++ + /************************/ + /*** INVALID REQUESTS ***/ + /************************/ +@@ -418,20 +436,6 @@ static struct RequestTest { + { { NULL } } + }, + +- { "NUL in header name", "666316", +- "GET / HTTP/1.1\r\n\x00: silly\r\n", 37, +- SOUP_STATUS_BAD_REQUEST, +- NULL, NULL, -1, +- { { NULL } } +- }, +- +- { "NUL in header value", NULL, +- "GET / HTTP/1.1\r\nHost: example\x00com\r\n", 37, +- SOUP_STATUS_BAD_REQUEST, +- NULL, NULL, -1, +- { { NULL } } +- }, +- + { "No terminating CRLF", NULL, + "GET / HTTP/1.1\r\nHost: example.com", -1, + SOUP_STATUS_BAD_REQUEST, +@@ -608,6 +612,22 @@ static struct ResponseTest { + { NULL } } + }, + ++ { "NUL in header name", "760832", ++ "HTTP/1.1 200 OK\r\nF\x00oo: bar\r\n", 28, ++ SOUP_HTTP_1_1, SOUP_STATUS_OK, "OK", ++ { { "Foo", "bar" }, ++ { NULL } ++ } ++ }, ++ ++ { "NUL in header value", "760832", ++ "HTTP/1.1 200 OK\r\nFoo: b\x00" "ar\r\n", 28, ++ SOUP_HTTP_1_1, SOUP_STATUS_OK, "OK", ++ { { "Foo", "bar" }, ++ { NULL } ++ } ++ }, ++ + /*************************/ + /*** INVALID RESPONSES ***/ + /*************************/ +@@ -677,18 +697,6 @@ static struct ResponseTest { + -1, 0, NULL, + { { NULL } } + }, +- +- { "NUL in header name", NULL, +- "HTTP/1.1 200 OK\r\nF\x00oo: bar\r\n", 28, +- -1, 0, NULL, +- { { NULL } } +- }, +- +- { "NUL in header value", NULL, +- "HTTP/1.1 200 OK\r\nFoo: b\x00ar\r\n", 28, +- -1, 0, NULL, +- { { NULL } } +- }, + }; + static const int num_resptests = G_N_ELEMENTS (resptests); + diff --git a/SOURCES/rh1304238-ja-translation.patch b/SOURCES/rh1304238-ja-translation.patch new file mode 100644 index 0000000..417943b --- /dev/null +++ b/SOURCES/rh1304238-ja-translation.patch @@ -0,0 +1,160 @@ +diff -up libsoup-2.48.1/po/ja.po.translation libsoup-2.48.1/po/ja.po +--- libsoup-2.48.1/po/ja.po.translation 2016-04-13 08:06:46.450298968 +0200 ++++ libsoup-2.48.1/po/ja.po 2016-04-13 08:06:56.466298536 +0200 +@@ -1,81 +1,133 @@ + # libsoup ja.po + # Copyright (C) 2012 libsoup's COPYRIGHT HOLDER + # This file is distributed under the same license as the libsoup package. +-# Takayuki KUSANO , 2012. + # ++# Takayuki KUSANO , 2012, 2016. + msgid "" + msgstr "" + "Project-Id-Version: libsoup master\n" +-"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup&keywords=I18N+L10N&component=general\n" +-"POT-Creation-Date: 2012-11-02 19:31+0000\n" +-"PO-Revision-Date: 2012-10-12 13:30+0900\n" +-"Last-Translator: Takayuki KUSANO \n" +-"Language-Team: Japanese \n" ++"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" ++"product=libsoup&keywords=I18N+L10N&component=general\n" ++"POT-Creation-Date: 2016-03-14 13:25+0000\n" ++"PO-Revision-Date: 2016-03-15 10:19+1000\n" ++"Last-Translator: \n" ++"Language-Team: Japanese \n" + "Language: ja\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=1; plural=0;\n" ++"X-Generator: Lokalize 1.5\n" + +-#: ../libsoup/soup-body-input-stream.c:141 +-#: ../libsoup/soup-body-input-stream.c:172 +-#: ../libsoup/soup-body-input-stream.c:205 ../libsoup/soup-message-io.c:191 ++#: ../libsoup/soup-body-input-stream.c:140 ++#: ../libsoup/soup-body-input-stream.c:171 ++#: ../libsoup/soup-body-input-stream.c:204 ../libsoup/soup-message-io.c:200 + msgid "Connection terminated unexpectedly" + msgstr "接続が突然切断されました" + +-#: ../libsoup/soup-body-input-stream.c:461 ++#: ../libsoup/soup-body-input-stream.c:462 + msgid "Invalid seek request" + msgstr "無効な seek 要求" + +-#: ../libsoup/soup-body-input-stream.c:489 ++#: ../libsoup/soup-body-input-stream.c:490 + msgid "Cannot truncate SoupBodyInputStream" + msgstr "SoupBodyInputStream は truncate できません" + ++#: ../libsoup/soup-cache-input-stream.c:73 ++msgid "Network stream unexpectedly closed" ++msgstr "ネットワークストリームが予想外に閉じられました" ++ ++#: ../libsoup/soup-cache-input-stream.c:290 ++msgid "Failed to completely cache the resource" ++msgstr "リソースの完全なキャッシュに失敗しました" ++ + #: ../libsoup/soup-converter-wrapper.c:192 + #, c-format + msgid "Output buffer is too small" + msgstr "出力バッファーが小さすぎます" + +-#: ../libsoup/soup-message-io.c:846 ../libsoup/soup-message-io.c:882 +-msgid "Operation was cancelled" +-msgstr "動作が中止されました" ++#: ../libsoup/soup-message-client-io.c:41 ++#| msgid "Could not parse URI '%s'" ++msgid "Could not parse HTTP response" ++msgstr "HTTP 応答をパースできませんでした" ++ ++#: ../libsoup/soup-message-client-io.c:66 ++msgid "Unrecognized HTTP response encoding" ++msgstr "認識できない HTTP 応答をエンコードしています" + +-#: ../libsoup/soup-message-io.c:893 ++#: ../libsoup/soup-message-io.c:357 ../libsoup/soup-message-io.c:960 + msgid "Operation would block" + msgstr "動作はブロックします" + +-#: ../libsoup/soup-request.c:142 ++#: ../libsoup/soup-message-io.c:912 ../libsoup/soup-message-io.c:949 ++msgid "Operation was cancelled" ++msgstr "動作が中止されました" ++ ++#: ../libsoup/soup-message-server-io.c:41 ++#| msgid "Could not parse URI '%s'" ++msgid "Could not parse HTTP request" ++msgstr "HTTP 応答ををパースできませんでした" ++ ++#: ../libsoup/soup-request.c:140 + #, c-format + msgid "No URI provided" + msgstr "URI が与えられていません" + +-#: ../libsoup/soup-request.c:152 ++#: ../libsoup/soup-request.c:150 + #, c-format + msgid "Invalid '%s' URI: %s" + msgstr "不正なスキーム '%s' の URI: %s" + +-#: ../libsoup/soup-requester.c:219 ++#: ../libsoup/soup-server.c:1529 ++msgid "Can't create a TLS server without a TLS certificate" ++msgstr "TLS 証明書がないと TLS サーバーは作成できません" ++ ++#: ../libsoup/soup-server.c:1548 ++#, c-format ++msgid "Could not listen on address %s, port %d" ++msgstr "アドレス %s、ポート %d をリッスンできませんでした" ++ ++#: ../libsoup/soup-session.c:4485 + #, c-format + msgid "Could not parse URI '%s'" + msgstr "URI '%s' をパースできませんでした" + +-#: ../libsoup/soup-requester.c:253 ++#: ../libsoup/soup-session.c:4522 + #, c-format + msgid "Unsupported URI scheme '%s'" + msgstr "サポートされていない URI のスキーム '%s'" + +-#: ../libsoup/soup-tld.c:154 ++#: ../libsoup/soup-session.c:4544 ++#, c-format ++msgid "Not an HTTP URI" ++msgstr "HTTP URI ではありません" ++ ++#: ../libsoup/soup-socket.c:142 ++msgid "Can't import non-socket as SoupSocket" ++msgstr "非ソケットを SoupSocket としてインポートできません" ++ ++#: ../libsoup/soup-socket.c:160 ++msgid "Could not import existing socket: " ++msgstr "既存のソケットをインポートできませんでした:" ++ ++#: ../libsoup/soup-socket.c:169 ++msgid "Can't import unconnected socket" ++msgstr "非接続ソケットをインポートできません" ++ ++#: ../libsoup/soup-tld.c:188 + msgid "Hostname is an IP address" + msgstr "ホスト名が IP アドレスです" + +-#: ../libsoup/soup-tld.c:175 ++#: ../libsoup/soup-tld.c:198 ../libsoup/soup-tld.c:220 + msgid "Invalid hostname" + msgstr "不正なホスト名です" + +-#: ../libsoup/soup-tld.c:204 ++#: ../libsoup/soup-tld.c:250 + msgid "Hostname has no base domain" + msgstr "ホスト名にトップレベルドメインがありません" + + # ソースコードと http://www.nic.ad.jp/ja/dom/system.html 参照 +-#: ../libsoup/soup-tld.c:226 ++#: ../libsoup/soup-tld.c:304 + msgid "Not enough domains" + msgstr "ドメイン名が十分な数のラベルがありません" ++ diff --git a/SOURCES/rh1328453-ntlm-auth-failure.patch b/SOURCES/rh1328453-ntlm-auth-failure.patch new file mode 100644 index 0000000..5156faf --- /dev/null +++ b/SOURCES/rh1328453-ntlm-auth-failure.patch @@ -0,0 +1,29 @@ +diff -up libsoup-2.48.1/libsoup/soup-auth-ntlm.c.ntlm-auth-failure libsoup-2.48.1/libsoup/soup-auth-ntlm.c +--- libsoup-2.48.1/libsoup/soup-auth-ntlm.c.ntlm-auth-failure 2016-04-19 17:53:34.747283256 +0200 ++++ libsoup-2.48.1/libsoup/soup-auth-ntlm.c 2016-04-19 17:53:34.753283256 +0200 +@@ -354,6 +354,7 @@ soup_auth_ntlm_update_connection (SoupCo + conn->state = SOUP_NTLM_SSO_FAILED; + success = FALSE; + } else if (!g_ascii_strcasecmp (response, "PW")) { ++ conn->state = SOUP_NTLM_SSO_FAILED; + priv->sso_available = FALSE; + g_free (response); + } else { +@@ -484,7 +485,7 @@ soup_auth_ntlm_get_connection_authorizat + priv->sso_available = FALSE; + } + } else { +- g_warning ("NTLM single-sign-on using %s failed", NTLM_AUTH); ++ g_debug ("NTLM single-sign-on using %s failed", NTLM_AUTH); + } + } + /* If NTLM single-sign-on fails, go back to original +@@ -519,7 +520,7 @@ soup_auth_ntlm_get_connection_authorizat + #ifdef USE_NTLM_AUTH + case SOUP_NTLM_SSO_FAILED: + /* Restart request without SSO */ +- g_warning ("NTLM single-sign-on by using %s failed", NTLM_AUTH); ++ g_debug ("NTLM single-sign-on by using %s failed", NTLM_AUTH); + priv->sso_available = FALSE; + header = soup_ntlm_request (); + conn->state = SOUP_NTLM_SENT_REQUEST; diff --git a/SPECS/libsoup.spec b/SPECS/libsoup.spec index 9fbb488..bdcf84f 100644 --- a/SPECS/libsoup.spec +++ b/SPECS/libsoup.spec @@ -4,7 +4,7 @@ Name: libsoup Version: 2.48.1 -Release: 3%{?dist} +Release: 6%{?dist} License: LGPLv2 Group: Development/Libraries Summary: Soup, an HTTP library implementation @@ -13,6 +13,9 @@ URL: http://live.gnome.org/LibSoup Source: http://download.gnome.org/sources/libsoup/2.48/libsoup-%{version}.tar.xz Patch1: rh1088458-ntlm-fix.patch Patch2: rh1224989-make-check.patch +Patch3: rh1304238-ja-translation.patch +Patch4: rh1302366-nul-in-headers.patch +Patch5: rh1328453-ntlm-auth-failure.patch Requires: glib-networking >= %{glib2_version} @@ -52,6 +55,9 @@ you to develop applications that use the libsoup library. %setup -q %patch1 -p1 -b .ntlm-fix %patch2 -p1 -b .check +%patch3 -p1 -b .ja-translation +%patch4 -p1 -b .nul-in-headers +%patch5 -p1 -b .ntlm-auth-failure %build %configure --disable-static @@ -86,6 +92,15 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la %{_datadir}/gtk-doc/html/%{name}-2.4 %changelog +* Tue Apr 19 2016 Milan Crha - 2.48.1-6 +- NTLM auth failure with latest samba (rh #1328453) + +* Wed Apr 13 2016 Milan Crha - 2.48.1-5 +- soup_headers_parse: deal with NUL bytes in headers (rh #1302366) + +* Wed Apr 13 2016 Milan Crha - 2.48.1-4 +- Update ja.po translation file (rh #1304238) + * Tue May 26 2015 Dan Winship - 2.48.1-3 - Fix "make check" when LC_ALL is set (rh #1224989)