From b598965866ed93a9ce0ee5b2cd9ac4ef7109ec9b Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice
Date: Tue, 30 Jan 2018 08:14:16 +0100
Subject: gnu: rsync: Update to 3.1.3.
* gnu/packages/rsync.scm (rsync): Update to 3.1.3.
[source]: Remove patches for fixed CVEs.
[properties]: Remove field.
* packages/patches/rsync-CVE-2017-16548.patch: Delete file.
* packages/patches/rsync-CVE-2017-17433.patch: Delete file.
* packages/patches/rsync-CVE-2017-17433-fix-tests.patch: Delete file.
* packages/patches/rsync-CVE-2017-17434-pt1.patch: Delete file.
* packages/patches/rsync-CVE-2017-17434-pt2.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Remove them.
---
gnu/local.mk | 5 -----
1 file changed, 5 deletions(-)
(limited to 'gnu/local.mk')
diff --git a/gnu/local.mk b/gnu/local.mk
index 80d6a8d4c4..1f3050485a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1063,11 +1063,6 @@ dist_patch_DATA = \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rsem-makefile.patch \
- %D%/packages/patches/rsync-CVE-2017-16548.patch \
- %D%/packages/patches/rsync-CVE-2017-17433.patch \
- %D%/packages/patches/rsync-CVE-2017-17433-fix-tests.patch \
- %D%/packages/patches/rsync-CVE-2017-17434-pt1.patch \
- %D%/packages/patches/rsync-CVE-2017-17434-pt2.patch \
%D%/packages/patches/rtags-separate-rct.patch \
%D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \
%D%/packages/patches/ruby-concurrent-test-arm.patch \
--
cgit v1.2.3
From 6ec8a3cc95c25ee295cf2e4b925b84092bb0da44 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès
Date: Sat, 27 Jan 2018 23:11:57 +0100
Subject: gnu: Add Enki.
* gnu/packages/robotics.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
gnu/local.mk | 3 ++-
gnu/packages/robotics.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/robotics.scm
(limited to 'gnu/local.mk')
diff --git a/gnu/local.mk b/gnu/local.mk
index 1f3050485a..6c46c4e5da 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès
+# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès
# Copyright © 2013, 2014, 2015, 2016, 2017 Andreas Enge
# Copyright © 2016 Mathieu Lirzin
# Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Mark H Weaver
@@ -357,6 +357,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/re2c.scm \
%D%/packages/readline.scm \
%D%/packages/regex.scm \
+ %D%/packages/robotics.scm \
%D%/packages/rrdtool.scm \
%D%/packages/rsync.scm \
%D%/packages/ruby.scm \
diff --git a/gnu/packages/robotics.scm b/gnu/packages/robotics.scm
new file mode 100644
index 0000000000..da6f8856b8
--- /dev/null
+++ b/gnu/packages/robotics.scm
@@ -0,0 +1,67 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Ludovic Courtès
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see .
+
+(define-module (gnu packages robotics)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system cmake)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages sdl))
+
+(define-public enki
+ ;; Previous versions use Qt4 and are unsuitable for Aseba.
+ (let ((commit "afd2d8e2f91c095f6745505ca1f32f31ea874200")
+ (revision "0"))
+ (package
+ (name "enki")
+ (version (git-version "2.0pre" revision commit))
+ (home-page "https://github.com/enki-community/enki/")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit commit)))
+ (sha256
+ (base32
+ "1d1901zzsfml97hb4mb3ah3ab1bk4kh7bn6m7xrj1rv0gk9wkhq7"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs
+ ;; Optionally, add Python + Boost for Python bindings.
+ `(("sdl2" ,sdl2)))
+ (propagated-inputs
+ ;; 'Viewer.h' includes 'QGLWidget'.
+ `(("qtbase" ,qtbase) ;the viewer module needs Qt5 + MESA
+ ("mesa" ,mesa)))
+ (synopsis "Robot simulator")
+ (description
+ "Enki is a robot simulator written in C++. It provides collision and
+limited physics support for robots evolving on a flat surface. On a
+contemporary desktop computer, Enki is able to simulate groups of robots
+hundred times faster than real-time.")
+
+ ;; The 'LICENSE' file as well as source file headers says that
+ ;; researchers using the software are "asked" to cite using a given
+ ;; citation, but that sentence is written as not being part of the
+ ;; license (fortunately).
+ (license license:gpl2+))))
--
cgit v1.2.3
From 51f887f33d08a805fa62c726c81904ce54a540ac Mon Sep 17 00:00:00 2001
From: Adam Van Ymeren
Date: Thu, 23 Nov 2017 15:04:46 -0500
Subject: gnu: python-axolotl: Update to 0.1.39 and fix build.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
python-axolotl has been failing since March,
https://hydra.gnu.org/job/gnu/master/python-axolotl-0.1.35.x86_64-linux
This also fixes the OMEMO and OTR plugins for Gajim work.
* gnu/packages/patches/python-axolotl-AES-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-crypto.scm (python-axolotl): Upgrade to 0.1.39.
[source]: Use the patch.
Signed-off-by: Ludovic Courtès
---
gnu/local.mk | 1 +
gnu/packages/patches/python-axolotl-AES-fix.patch | 24 +++++++++++++++++++++++
gnu/packages/python-crypto.scm | 5 +++--
3 files changed, 28 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/python-axolotl-AES-fix.patch
(limited to 'gnu/local.mk')
diff --git a/gnu/local.mk b/gnu/local.mk
index 6c46c4e5da..f9264231ed 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1017,6 +1017,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3.5-fix-tests.patch \
%D%/packages/patches/python-3.5-getentropy-on-old-kernels.patch \
+ %D%/packages/patches/python-axolotl-AES-fix.patch \
%D%/packages/patches/python-dendropy-fix-tests.patch \
%D%/packages/patches/python-fix-tests.patch \
%D%/packages/patches/python-genshi-add-support-for-python-3.4-AST.patch \
diff --git a/gnu/packages/patches/python-axolotl-AES-fix.patch b/gnu/packages/patches/python-axolotl-AES-fix.patch
new file mode 100644
index 0000000000..d34f4855cb
--- /dev/null
+++ b/gnu/packages/patches/python-axolotl-AES-fix.patch
@@ -0,0 +1,24 @@
+Patch taken from the Debian package for python-axolotl-0.1.39.
+See .
+
+Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode.
+Author: Josue Ortega
+Last-Update: 2017-04-13
+
+--- a/axolotl/sessioncipher.py
++++ b/axolotl/sessioncipher.py
+@@ -228,13 +228,7 @@
+ # counterint = struct.unpack(">L", counterbytes)[0]
+ # counterint = int.from_bytes(counterbytes, byteorder='big')
+ ctr = Counter.new(128, initial_value=counter)
+-
+- # cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
+- ivBytes = bytearray(16)
+- ByteUtil.intToByteArray(ivBytes, 0, counter)
+-
+- cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr)
+-
++ cipher = AES.new(key, AES.MODE_CTR, counter=ctr)
+ return cipher
+
+
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 7b0054cf8a..a9059efa5f 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -450,7 +450,7 @@ python-axolotl.")
(define-public python-axolotl
(package
(name "python-axolotl")
- (version "0.1.35")
+ (version "0.1.39")
(source
(origin
(method url-fetch)
@@ -458,8 +458,9 @@ python-axolotl.")
"https://github.com/tgalal/python-axolotl/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
+ (patches (search-patches "python-axolotl-AES-fix.patch"))
(sha256
- (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
+ (base32 "0badsgkgz0ir3hqynxzsfjgacppi874syvvmgccc6j164053x6zm"))))
(build-system python-build-system)
(arguments
`(#:phases
--
cgit v1.2.3
From 547c4bd23c3d7ac9fd284867f2b8453af9218f28 Mon Sep 17 00:00:00 2001
From: Leo Famulari
Date: Wed, 31 Jan 2018 19:21:03 -0500
Subject: gnu: transmission: Update to 2.93.
* gnu/packages/bittorrent.scm (transmission): Update to 2.93.
[source]: Update URL and remove patch.
* gnu/packages/patches/transmission-fix-dns-rebinding-vuln.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 1 -
gnu/packages/bittorrent.scm | 12 +-
.../transmission-fix-dns-rebinding-vuln.patch | 302 ---------------------
3 files changed, 5 insertions(+), 310 deletions(-)
delete mode 100644 gnu/packages/patches/transmission-fix-dns-rebinding-vuln.patch
(limited to 'gnu/local.mk')
diff --git a/gnu/local.mk b/gnu/local.mk
index f9264231ed..6fdea16c88 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1107,7 +1107,6 @@ dist_patch_DATA = \
%D%/packages/patches/tipp10-fix-compiling.patch \
%D%/packages/patches/tipp10-remove-license-code.patch \
%D%/packages/patches/tk-find-library.patch \
- %D%/packages/patches/transmission-fix-dns-rebinding-vuln.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \
%D%/packages/patches/ttfautohint-source-date-epoch.patch \
%D%/packages/patches/tophat-build-with-later-seqan.patch \
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 3c9279df96..dc051e2627 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès
-;;; Copyright © 2016 Leo Famulari
+;;; Copyright © 2016, 2018 Leo Famulari
;;; Copyright © 2016, 2017 Leo Famulari
;;; Copyright © 2016, 2017 Efraim Flashner
;;; Copyright © 2016 Tomáš Čech
@@ -60,17 +60,15 @@
(define-public transmission
(package
(name "transmission")
- (version "2.92")
+ (version "2.93")
(source (origin
(method url-fetch)
(uri (string-append
- "https://transmission.cachefly.net/transmission-"
- version ".tar.xz"))
- ;; CVE-2018-5702
- (patches (search-patches "transmission-fix-dns-rebinding-vuln.patch"))
+ "https://github.com/transmission/transmission-releases/raw/"
+ "master/transmission-" version ".tar.xz"))
(sha256
(base32
- "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s"))))
+ "02xrp49gsv4jkbzp37qrwlnb9nlja08s92dyvgdbr6a4187945c8"))))
(build-system glib-or-gtk-build-system)
(outputs '("out" ; library and command-line interface
"gui")) ; graphical user interface
diff --git a/gnu/packages/patches/transmission-fix-dns-rebinding-vuln.patch b/gnu/packages/patches/transmission-fix-dns-rebinding-vuln.patch
deleted file mode 100644
index a3a0cf1608..0000000000
--- a/gnu/packages/patches/transmission-fix-dns-rebinding-vuln.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-Fix a weakness that allows remote code execution via the Transmission
-RPC server using DNS rebinding:
-
-https://bugs.chromium.org/p/project-zero/issues/detail?id=1447
-
-Patch adapted from Tavis Ormandy's patch on the Transmission master
-branch to the Transmission 2.92 release by Leo Famulari
-:
-
-https://github.com/transmission/transmission/pull/468/commits
-
-From fe2d3c6e75088f3d9b6040ce06da3d530358bc2f Mon Sep 17 00:00:00 2001
-From: Tavis Ormandy
-Date: Thu, 11 Jan 2018 10:00:41 -0800
-Subject: [PATCH] mitigate dns rebinding attacks against daemon
-
----
- libtransmission/quark.c | 2 +
- libtransmission/quark.h | 2 +
- libtransmission/rpc-server.c | 116 +++++++++++++++++++++++++++++++++++++----
- libtransmission/rpc-server.h | 4 ++
- libtransmission/session.c | 2 +
- libtransmission/transmission.h | 1 +
- libtransmission/web.c | 3 ++
- 7 files changed, 121 insertions(+), 9 deletions(-)
-
-diff --git a/libtransmission/quark.c b/libtransmission/quark.c
-index 30cc2bca4..b4fd7aabd 100644
---- a/libtransmission/quark.c
-+++ b/libtransmission/quark.c
-@@ -289,6 +289,8 @@ static const struct tr_key_struct my_static[] =
- { "rpc-authentication-required", 27 },
- { "rpc-bind-address", 16 },
- { "rpc-enabled", 11 },
-+ { "rpc-host-whitelist", 18 },
-+ { "rpc-host-whitelist-enabled", 26 },
- { "rpc-password", 12 },
- { "rpc-port", 8 },
- { "rpc-url", 7 },
-diff --git a/libtransmission/quark.h b/libtransmission/quark.h
-index 7f5212733..17464be8f 100644
---- a/libtransmission/quark.h
-+++ b/libtransmission/quark.h
-@@ -291,6 +291,8 @@ enum
- TR_KEY_rpc_authentication_required,
- TR_KEY_rpc_bind_address,
- TR_KEY_rpc_enabled,
-+ TR_KEY_rpc_host_whitelist,
-+ TR_KEY_rpc_host_whitelist_enabled,
- TR_KEY_rpc_password,
- TR_KEY_rpc_port,
- TR_KEY_rpc_url,
-diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c
-index a3485f3fa..292cd5fce 100644
---- a/libtransmission/rpc-server.c
-+++ b/libtransmission/rpc-server.c
-@@ -52,6 +52,7 @@ struct tr_rpc_server
- bool isEnabled;
- bool isPasswordEnabled;
- bool isWhitelistEnabled;
-+ bool isHostWhitelistEnabled;
- tr_port port;
- char * url;
- struct in_addr bindAddress;
-@@ -63,6 +64,7 @@ struct tr_rpc_server
- char * password;
- char * whitelistStr;
- tr_list * whitelist;
-+ tr_list * hostWhitelist;
-
- char * sessionId;
- time_t sessionIdExpiresAt;
-@@ -588,6 +590,49 @@ isAddressAllowed (const tr_rpc_server * server, const char * address)
- return false;
- }
-
-+static bool isHostnameAllowed(tr_rpc_server const* server, struct evhttp_request* req)
-+{
-+ /* If password auth is enabled, any hostname is permitted. */
-+ if (server->isPasswordEnabled)
-+ {
-+ return true;
-+ }
-+
-+ char const* const host = evhttp_find_header(req->input_headers, "Host");
-+
-+ // If whitelist is disabled, no restrictions.
-+ if (!server->isHostWhitelistEnabled)
-+ return true;
-+
-+ /* No host header, invalid request. */
-+ if (host == NULL)
-+ {
-+ return false;
-+ }
-+
-+ /* Host header might include the port. */
-+ char* const hostname = tr_strndup(host, strcspn(host, ":"));
-+
-+ /* localhost or ipaddress is always acceptable. */
-+ if (strcmp(hostname, "localhost") == 0 || strcmp(hostname, "localhost.") == 0 || tr_addressIsIP(hostname))
-+ {
-+ tr_free(hostname);
-+ return true;
-+ }
-+
-+ /* Otherwise, hostname must be whitelisted. */
-+ for (tr_list* l = server->hostWhitelist; l != NULL; l = l->next) {
-+ if (tr_wildmat(hostname, l->data))
-+ {
-+ tr_free(hostname);
-+ return true;
-+ }
-+ }
-+
-+ tr_free(hostname);
-+ return false;
-+}
-+
- static bool
- test_session_id (struct tr_rpc_server * server, struct evhttp_request * req)
- {
-@@ -663,6 +708,23 @@ handle_request (struct evhttp_request * req, void * arg)
- handle_upload (req, server);
- }
- #ifdef REQUIRE_SESSION_ID
-+ else if (!isHostnameAllowed(server, req))
-+ {
-+ char* tmp = tr_strdup_printf(
-+ "Transmission received your request, but the hostname was unrecognized.
"
-+ "To fix this, choose one of the following options:"
-+ "
"
-+ "- Enable password authentication, then any hostname is allowed.
"
-+ "- Add the hostname you want to use to the whitelist in settings.
"
-+ "
"
-+ "If you're editing settings.json, see the 'rpc-host-whitelist' and 'rpc-host-whitelist-enabled' entries.
"
-+ "This requirement has been added to help prevent "
-+ "DNS Rebinding "
-+ "attacks.
");
-+ send_simple_response(req, 421, tmp);
-+ tr_free(tmp);
-+ }
-+
- else if (!test_session_id (server, req))
- {
- const char * sessionId = get_current_session_id (server);
-@@ -674,7 +736,7 @@ handle_request (struct evhttp_request * req, void * arg)
- " When you get this 409 error message, resend your request with the updated header"
- ""
- "This requirement has been added to help prevent "
-- "CSRF "
-+ "CSRF "
- "attacks.
"
- "%s: %s
",
- TR_RPC_SESSION_ID_HEADER, sessionId);
-@@ -875,19 +937,14 @@ tr_rpcGetUrl (const tr_rpc_server * server)
- return server->url ? server->url : "";
- }
-
--void
--tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
-+static void
-+tr_rpcSetList (char const* whitelistStr, tr_list** list)
- {
- void * tmp;
- const char * walk;
-
-- /* keep the string */
-- tmp = server->whitelistStr;
-- server->whitelistStr = tr_strdup (whitelistStr);
-- tr_free (tmp);
--
- /* clear out the old whitelist entries */
-- while ((tmp = tr_list_pop_front (&server->whitelist)))
-+ while ((tmp = tr_list_pop_front (list)) != NULL)
- tr_free (tmp);
-
- /* build the new whitelist entries */
-@@ -896,7 +953,7 @@ tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
- const char * delimiters = " ,;";
- const size_t len = strcspn (walk, delimiters);
- char * token = tr_strndup (walk, len);
-- tr_list_append (&server->whitelist, token);
-+ tr_list_append (list, token);
- if (strcspn (token, "+-") < len)
- tr_logAddNamedInfo (MY_NAME, "Adding address to whitelist: %s (And it has a '+' or '-'! Are you using an old ACL by mistake?)", token);
- else
-@@ -909,6 +966,21 @@ tr_rpcSetWhitelist (tr_rpc_server * server, const char * whitelistStr)
- }
- }
-
-+void tr_rpcSetHostWhitelist(tr_rpc_server* server, char const* whitelistStr)
-+{
-+ tr_rpcSetList(whitelistStr, &server->hostWhitelist);
-+}
-+
-+void tr_rpcSetWhitelist(tr_rpc_server* server, char const* whitelistStr)
-+{
-+ /* keep the string */
-+ char* const tmp = server->whitelistStr;
-+ server->whitelistStr = tr_strdup(whitelistStr);
-+ tr_free(tmp);
-+
-+ tr_rpcSetList(whitelistStr, &server->whitelist);
-+}
-+
- const char*
- tr_rpcGetWhitelist (const tr_rpc_server * server)
- {
-@@ -930,6 +1002,11 @@ tr_rpcGetWhitelistEnabled (const tr_rpc_server * server)
- return server->isWhitelistEnabled;
- }
-
-+void tr_rpcSetHostWhitelistEnabled(tr_rpc_server* server, bool isEnabled)
-+{
-+ server->isHostWhitelistEnabled = isEnabled;
-+}
-+
- /****
- ***** PASSWORD
- ****/
-@@ -1063,6 +1140,28 @@ tr_rpcInit (tr_session * session, tr_variant * settings)
- else
- tr_rpcSetWhitelistEnabled (s, boolVal);
-
-+ key = TR_KEY_rpc_host_whitelist_enabled;
-+
-+ if (!tr_variantDictFindBool(settings, key, &boolVal))
-+ {
-+ missing_settings_key(key);
-+ }
-+ else
-+ {
-+ tr_rpcSetHostWhitelistEnabled(s, boolVal);
-+ }
-+
-+ key = TR_KEY_rpc_host_whitelist;
-+
-+ if (!tr_variantDictFindStr(settings, key, &str, NULL) && str != NULL)
-+ {
-+ missing_settings_key(key);
-+ }
-+ else
-+ {
-+ tr_rpcSetHostWhitelist(s, str);
-+ }
-+
- key = TR_KEY_rpc_authentication_required;
- if (!tr_variantDictFindBool (settings, key, &boolVal))
- missing_settings_key (key);
-diff --git a/libtransmission/rpc-server.h b/libtransmission/rpc-server.h
-index e0302c5ea..8c9e6b24e 100644
---- a/libtransmission/rpc-server.h
-+++ b/libtransmission/rpc-server.h
-@@ -49,6 +49,10 @@ void tr_rpcSetWhitelist (tr_rpc_server * server,
-
- const char* tr_rpcGetWhitelist (const tr_rpc_server * server);
-
-+void tr_rpcSetHostWhitelistEnabled(tr_rpc_server* server, bool isEnabled);
-+
-+void tr_rpcSetHostWhitelist(tr_rpc_server* server, char const* whitelist);
-+
- void tr_rpcSetPassword (tr_rpc_server * server,
- const char * password);
-
-diff --git a/libtransmission/session.c b/libtransmission/session.c
-index 844cadba8..58b717913 100644
---- a/libtransmission/session.c
-+++ b/libtransmission/session.c
-@@ -359,6 +359,8 @@ tr_sessionGetDefaultSettings (tr_variant * d)
- tr_variantDictAddStr (d, TR_KEY_rpc_username, "");
- tr_variantDictAddStr (d, TR_KEY_rpc_whitelist, TR_DEFAULT_RPC_WHITELIST);
- tr_variantDictAddBool (d, TR_KEY_rpc_whitelist_enabled, true);
-+ tr_variantDictAddStr(d, TR_KEY_rpc_host_whitelist, TR_DEFAULT_RPC_HOST_WHITELIST);
-+ tr_variantDictAddBool(d, TR_KEY_rpc_host_whitelist_enabled, true);
- tr_variantDictAddInt (d, TR_KEY_rpc_port, atoi (TR_DEFAULT_RPC_PORT_STR));
- tr_variantDictAddStr (d, TR_KEY_rpc_url, TR_DEFAULT_RPC_URL_STR);
- tr_variantDictAddBool (d, TR_KEY_scrape_paused_torrents_enabled, true);
-diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h
-index 4f76adfd6..e213a8f4e 100644
---- a/libtransmission/transmission.h
-+++ b/libtransmission/transmission.h
-@@ -123,6 +123,7 @@ const char* tr_getDefaultDownloadDir (void);
- #define TR_DEFAULT_BIND_ADDRESS_IPV4 "0.0.0.0"
- #define TR_DEFAULT_BIND_ADDRESS_IPV6 "::"
- #define TR_DEFAULT_RPC_WHITELIST "127.0.0.1"
-+#define TR_DEFAULT_RPC_HOST_WHITELIST ""
- #define TR_DEFAULT_RPC_PORT_STR "9091"
- #define TR_DEFAULT_RPC_URL_STR "/transmission/"
- #define TR_DEFAULT_PEER_PORT_STR "51413"
-diff --git a/libtransmission/web.c b/libtransmission/web.c
-index ee495e9fc..c7f062730 100644
---- a/libtransmission/web.c
-+++ b/libtransmission/web.c
-@@ -594,6 +594,7 @@ tr_webGetResponseStr (long code)
- case 415: return "Unsupported Media Type";
- case 416: return "Requested Range Not Satisfiable";
- case 417: return "Expectation Failed";
-+ case 421: return "Misdirected Request";
- case 500: return "Internal Server Error";
- case 501: return "Not Implemented";
- case 502: return "Bad Gateway";
--
cgit v1.2.3