Correct dynamic properties grpc json serializing 49/125749/3
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Sun, 14 Nov 2021 18:44:33 +0000 (20:44 +0200)
committerDan Timoney <dtimoney@att.com>
Mon, 29 Nov 2021 18:09:24 +0000 (18:09 +0000)
Correct the json serializing and escaping in command executor
for grpc server

Issue-ID: CCSDK-3521
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Change-Id: I5d0c9fbb7190e8de52bf954ef1af29a6f854f685

ms/command-executor/src/main/python/command_executor_handler.py

index 6a30157..b6d644c 100644 (file)
@@ -244,7 +244,7 @@ class CommandExecutorHandler():
             ### if properties are defined we add them to the command
             properties = ""
             if request.properties is not None and len(request.properties) > 0:
-                properties = " " + re.escape(MessageToJson(request.properties))
+                properties = " " + re.escape(MessageToJson(request.properties)).replace('"','\\"')
 
             # compatibility hack
             # check if the path for the request.command does not contain UUID, then add it after cba_name/cba_version path.