From 67d11bfa3b0c2cc08b24b5dbd16259dcd81fba6b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 7 Mar 2011 10:25:32 -0500 Subject: [PATCH] fix in BrowserToken to avoid Null Pointer Exception --- .../WEB-INF/src/org/adempiere/webui/util/BrowserToken.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/BrowserToken.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/BrowserToken.java index 0bded89acc..6342e697e8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/BrowserToken.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/BrowserToken.java @@ -125,7 +125,8 @@ public final class BrowserToken { MessageDigest digest = MessageDigest.getInstance("SHA-512"); Base64 encoder = new Base64(); digest.reset(); - digest.update(session.getWebSession().getBytes("UTF-8")); + if (session.getWebSession() != null) + digest.update(session.getWebSession().getBytes("UTF-8")); String password = null; if (MSystem.isZKRememberPasswordAllowed()) password = user.getPassword();