Bug 818565

Summary: Portal container name is hardcoded in the LocalizationFilter
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Thomas Heute <theute>
Component: PortalAssignee: Nobody <nobody>
Status: VERIFIED --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.2.1.GACC: epp-bugs, vramik
Target Milestone: ---   
Target Release: 5.2.2.ER01   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A hard-coded portal container name in the LocalizationFilter caused a NPE (NULL container) if the default context path was changed. The fix introduces changes to the way the portal container name is parsed by the LocalizationFilter, which corrects the issue.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Heute 2012-05-03 11:50:59 UTC
In LocalizationFilter.java, we hardcode "portal" for getting RootContainer:

if (container instanceof RootContainer)
     container = (ExoContainer) container.getComponentInstance("portal");
This affect if we change default context path as article: http://community.jboss.org/wiki/ChangeGateInContextPath. We will get the exception because NULL container.
The code should be change to:

if (container instanceof RootContainer)
     container = (ExoContainer) container.getComponentInstance(req.getContextPath().substring(1));

Comment 1 hfnukal@redhat.com 2012-08-24 14:27:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Portal container name is hardcoded in the LocalizationFilter
Consequence: We will get the exception because NULL container
Fix: Change code
Result: No NULL exception

Comment 2 vramik 2012-08-27 16:04:04 UTC
Verified again at 5.2.2 CR01

Comment 3 Jared MORGAN 2012-08-27 23:15:20 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-Cause: Portal container name is hardcoded in the LocalizationFilter
+A hard-coded portal container name in the LocalizationFilter caused a NPE (NULL container) if the default context path was changed. The fix introduces changes to the way the portal container name is parsed by the LocalizationFilter, which corrects the issue.-Consequence: We will get the exception because NULL container
-Fix: Change code
-Result: No NULL exception