[DeviceHome] Send plain text when secure flag is false 82/263282/1
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 30 Aug 2021 22:15:40 +0000 (15:15 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 30 Aug 2021 22:15:40 +0000 (15:15 -0700)
Plain text needs to be sent when secure flag is false.

Change-Id: Ica09d47df97559f9f80cbf104a636ddd400d4d25
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
device_home/service/relay-server.js

index a59b5ac..7794559 100755 (executable)
@@ -77,7 +77,7 @@ var OnReceived = function (msg) {
         if (id === TO_ALL) {
             console.log(`${TAG_HOST}[OnReceived] Send message to all web sockets`);
             console.log(`${TAG_HOST}[OnReceived] remoteClients length : ${remoteClients[pkgId].length}`);
-            let encryped = '';
+            let encryped = msg;
             for (let client of remoteClients[pkgId]) {
                 if (secure) {
                     encryped = encrypt(msg, client, pkgId, globalClientPublicKeys);