From 05c9967ac3122b45dd2fe2ae48d67d5e2a3f14d7 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 12 Nov 2019 08:33:34 -0600 Subject: T1801: escape isolated backslashes before passing to ConfigTree() --- src/services/vyos-http-api-server | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 1abaed873..9b6d7e979 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -24,6 +24,7 @@ import traceback import threading import vyos.config +import vyos.util import bottle @@ -212,6 +213,7 @@ def get_value(): config_format = command['configFormat'] res = session.show_config(path=command['path']) + res = vyos.util.escape_backslash(res) if config_format == 'json': config_tree = vyos.configtree.ConfigTree(res) res = json.loads(config_tree.to_json()) -- cgit v1.2.3