From 652c626644d03ccf7d03de8f51ae5a2a6e27fd66 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 29 Nov 2018 01:49:55 +0100 Subject: T1001: escape backslashes in the input in the commands pipe as well. --- src/helpers/commands-pipe.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/helpers/commands-pipe.py') 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) -- cgit v1.2.3