diff options
author | John Estabrook <jestabro@sentrium.io> | 2019-11-12 08:33:34 -0600 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-11-17 18:02:32 +0100 |
commit | 05c9967ac3122b45dd2fe2ae48d67d5e2a3f14d7 (patch) | |
tree | b599a7a5df149a4265b85c24da56a898792fbdb8 /src/services/vyos-http-api-server | |
parent | b1cc15ab68925fb333f1e75862faefa365ac18d1 (diff) | |
download | vyos-1x-05c9967ac3122b45dd2fe2ae48d67d5e2a3f14d7.tar.gz vyos-1x-05c9967ac3122b45dd2fe2ae48d67d5e2a3f14d7.zip |
T1801: escape isolated backslashes before passing to ConfigTree()
Diffstat (limited to 'src/services/vyos-http-api-server')
-rwxr-xr-x | src/services/vyos-http-api-server | 2 |
1 files changed, 2 insertions, 0 deletions
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()) |