Bug 794364 (JBEPP-1408) - In some cases, the very first login to /ecmdemo fails
Summary: In some cases, the very first login to /ecmdemo fails
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-1408
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0.CR03
Assignee: Thomas Heute
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-28 09:48 UTC by Thomas Heute
Modified: 2012-02-28 16:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-29 10:05:01 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 794363 0 high CLOSED In some cases, the very first login to /ecmdemo fails (Workaround) 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBEPP-1408 0 None None None Never

Internal Links: 794363

Description Thomas Heute 2011-11-28 09:48:36 UTC
project_key: JBEPP

A) Use attached patch for InitiateLoginServlet (class comes from EPP code) which ensures lazy initialization of longValidity and so it avoid situation that incorrect portal container "portal" is bound to ExoContainerContext thread-local variable. I think this patch should be applied anyway as bounding bad portal container can have other potential side-effects.

Index: component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java    (revision 6031)
+++ component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java    (revision )
@@ -19,6 +19,7 @@
 
 package org.exoplatform.web.login;
 
+import org.exoplatform.container.RootContainer;
 import org.exoplatform.container.web.AbstractHttpServlet;
 import org.exoplatform.web.security.security.AbstractTokenService;
 import org.exoplatform.web.security.security.CookieTokenService;
@@ -53,10 +54,6 @@
    public static final String COOKIE_NAME = "rememberme";
 
    /** . */
-   public static final long LOGIN_VALIDITY =
-           1000 * TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
-
-   /** . */
    private WCIController wciController;
 
    /** . */
@@ -112,7 +109,7 @@
       else
       {
          // WCI authentication
-         servletContainer.login(req, resp, credentials, LOGIN_VALIDITY, wciController.getInitialURI(req));
+         servletContainer.login(req, resp, credentials, getLoginValidity(), wciController.getInitialURI(req));
       }
    }
 
@@ -158,4 +155,9 @@
       }
       return wciController;
    }
+
+   private long getLoginValidity()
+   {
+      return 1000 * TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
-}
+   }
+}


This would also be better to remove the workaround JBEPP-1407

Comment 1 Thomas Heute 2011-11-28 09:48:48 UTC
Link: Added: This issue is related to JBEPP-1407



Note You need to log in before you can comment on or make changes to this bug.