Skip to content

Commit 5482c53

Browse files
author
Open Lowcode SAS
committed
Close #179
1 parent 8c3c855 commit 5482c53

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/org/openlowcode/server/runtime/ServerConnection.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,7 @@ public void setLoginWithContextAction(ActionExecution action, SActionData action
834834
StringWriter stringwriter = new StringWriter();
835835
MessageBufferedWriter embeddedactionwriter = new MessageBufferedWriter(
836836
new BufferedWriter(stringwriter, 100000), false);
837+
embeddedactionwriter.setAESCommunicator(OLcServer.getServer().getAESCommunicator());
837838
embeddedactionwriter.startNewMessage();
838839
embeddedactionwriter.startStructure("CONTEXT");
839840
embeddedactionwriter.addStringField("NAME", actionname);

src/org/openlowcode/tools/enc/AESCommunicator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public AESCommunicator(SecretKey secretkey) throws Exception {
6464
*/
6565
public byte[] zipandencrypt(String message) throws Exception {
6666
try {
67+
if (message==null) return null;
6768
byte[] messagebinary = message.getBytes("UTF-8");
6869
ByteArrayOutputStream baos = new ByteArrayOutputStream();
6970
deflater.setInput(messagebinary);
@@ -91,6 +92,7 @@ public byte[] zipandencrypt(String message) throws Exception {
9192
*/
9293
public String decryptandunzip(byte[] encryptedmessage) throws Exception {
9394
try {
95+
if (encryptedmessage==null) return null;
9496
byte[] decryptedzipcontent = decryptaescipher.doFinal(encryptedmessage);
9597
inflater.setInput(decryptedzipcontent);
9698
ByteArrayOutputStream baos = new ByteArrayOutputStream();

0 commit comments

Comments
 (0)