From df651d96c97dd608c54992efd978ad4fa135ec32 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 5 Jan 2015 22:22:36 +0200 Subject: [PATCH] Added null check to UUID decryption --- src/nodash/models/NoSession.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nodash/models/NoSession.java b/src/nodash/models/NoSession.java index 80b8b35..30715c2 100644 --- a/src/nodash/models/NoSession.java +++ b/src/nodash/models/NoSession.java @@ -208,6 +208,10 @@ public final class NoSession implements Serializable { } public static UUID decryptUUID(byte[] data) throws NoDashSessionBadUUIDException { + if (data == null) { + throw new NoDashSessionBadUUIDException(); + } + try { return UUID.fromString(new String(NoUtil.decrypt(data))); } catch (IllegalBlockSizeException e) {