details: https://code.openbravo.com/erp/devel/pi/rev/292e42c68726
changeset: 24274:292e42c68726
user: Rafa Alonso <rafael.alonso <at> openbravo.com>
date: Tue Aug 19 12:00:02 2014 +0200
summary: Fixes issue 27370: If the session is invalidated while retriving
session attributes,
- the session will end
- the console log will report that the session was invalidated while retriving
attributes
diffstat:
src-core/src/org/openbravo/base/VariablesBase.java | 4 +++-
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r ac581689470e -r 292e42c68726
src-core/src/org/openbravo/base/VariablesBase.java
--- a/src-core/src/org/openbravo/base/VariablesBase.java Mon Aug 18
20:50:33 2014 +0000
+++ b/src-core/src/org/openbravo/base/VariablesBase.java Tue Aug 19
12:00:02 2014 +0200
@@ -1344,7 +1344,9 @@
if (!attribute.equalsIgnoreCase("menuVertical"))
if (log4j.isDebugEnabled())
log4j.debug("Set session attribute: " + attribute + ":..." +
value.toString());
- } catch (Exception e) {
+ } catch (final IllegalStateException ise) {
+ throw new IllegalStateException(ise);
+ } catch (final Exception e) {
log4j.error("setSessionValue error: " + attribute + ":..." + value);
}
}
diff -r ac581689470e -r 292e42c68726
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Mon Aug
18 20:50:33 2014 +0000
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Tue Aug
19 12:00:02 2014 +0200
@@ -346,7 +346,10 @@
roleError.setType("Error");
roleError.setMessage(msg);
invalidLogin(request, response, roleError);
-
+ return;
+ } catch (final IllegalStateException ise) {
+ log4j.error("HTTPSecureAppServlet.service() - exception caught: ", ise);
+ invalidateSession(request);
return;
} catch (final Exception e) {
// Re-login
------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits