summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-29 01:49:55 +0100
committerDaniil Baturin <daniil@baturin.org>2018-11-29 01:49:55 +0100
commit652c626644d03ccf7d03de8f51ae5a2a6e27fd66 (patch)
tree0e22524870f290da5ca01978a436bdc509e78a4b
parent51d5bc278e6cb370abe89aff41e70236f5586638 (diff)
downloadvyos-1x-652c626644d03ccf7d03de8f51ae5a2a6e27fd66.tar.gz
vyos-1x-652c626644d03ccf7d03de8f51ae5a2a6e27fd66.zip
T1001: escape backslashes in the input in the commands pipe as well.
-rwxr-xr-xsrc/helpers/commands-pipe.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helpers/commands-pipe.py b/src/helpers/commands-pipe.py
index 1120bb09e..ab68ccade 100755
--- a/src/helpers/commands-pipe.py
+++ b/src/helpers/commands-pipe.py
@@ -9,6 +9,7 @@ from vyos.configtree import ConfigTree
signal(SIGPIPE,SIG_DFL)
config_string = sys.stdin.read().strip()
+config_string = config_string.replace("\\", "\\\\")
if not config_string:
sys.exit(0)