-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.1.X, 7.2.X, 7.3.X, 7.4.X, Master
-
Fix Version/s: 7.1.10 DXP FP25, 7.1.X, 7.2.10 DXP FP14, 7.2.10.5 DXP SP5, 7.2.X, 7.3.7 CE GA8, 7.3.10 DXP FP2, 7.3.X, 7.4.1 CE GA2, 7.4.2 CE GA3, 7.4.13 DXP GA1, Master
-
Component/s: Core Infrastructure
-
Branch Version/s:7.3.x, 7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
Description:
Not sure if this is a server error or a Liferay Portal one, but JBoss 7.2 encodes the path info in the request.
I think because when not passing through /web/ is not using VirtualHostFilter to redirects it with the Dispatcher which encodes it.
These because with Tomcat everything works fine, but in JBoss 7.2 it doesn't, for example what it happens in JBoss 7.2:
1. When used by specifying the full site, for example /en/web/guest/guía the httpServletRequest.getPathInfo() comes without encoding the characters (see screenshot_1)
2. But when it is not used specifying the complete site, more exactly without /web/, for example /es/guía the httpServletRequest.getPathInfo() is encoded /web/guest/gu%C3%ADa (see screenshot_2), the problem is that it will be encoded again here String redirect = HttpUtil.encodePath(path); and there is the bug and the code breaks because /web/guest/gu%25C3%25ADa is encoded twice and the page would not be found.
From what I have been able to observe is that the path info of the httpServletRequest is coming encoded a long time before reaching this getI18nData method and that is why I am thinking that it is something of URL encoding generated by JBoss 7.2 (see last two screenshots with the request, screenshot_3 when it works and the last one screenshot_4 when it doesn't work).
What we need to find is to know if we address this as a bug of Liferay Portal, and we fix by checking if this path info comes already encoded, so we don't do it twice. Because I have my doubts after checking the documentation HttpServletRequest.html#getPathInfo() is expected to not be encoded, so it might be a server fault.
If this is a server error related to JBoss 7.2 (not sure if other versions are affected) in this case what should we suggest to our clients?
Steps to reproduce:
1. Use this documentation to install JB oss-eap-7.2.0.zip on a DXP 7.2 FP9
2. Go to /jboss-eap-7.2.0/bin and run ./standalone.sh if windows the standalone.bat one
3. Once you set up the server, add a new page with a special character for example guía
4. Access this page by clicking view or navigating to it /web/guest/guía (works because doesn't come encoded but also is not passing through I18nServlet)
5. Now use the short URL /guía (works because is not passing through I18nServlet, but it comes encoded)
5. Now use the long URL with another available language in front so is passing through I18nServlet for example Spanish /es/web/guest/guía (works because doesn't come encoded)
6. Now use the short URL with another available language in front so is passing through I18nServlet for example Spanish /es/guía (doesn't work because comes encoded as it gets forwarded on VirtualHostFilter.java#L364 and is passing through I18nServlet that will encode again the URL, and as a result the page would not be found)
Actual: In JBoss 7.2 the path info comes encoded if not passing through /web/guest/ and if redirected through I18nServlet gets encoded twice and the page would not be found and fails to navigate
Expected: Find a solution that is less impacting that support this fail in JBoss 7.2 either in our portal or through JBoss configuration
Note: Affects Jboss 7.3 as well
* Please see Zendesk Support tab for further comments and attachments.
- causes
-
LPS-131709 No item selector views found for image-journal when trying to upload an image passing thru I18nServlet
- Closed
- is caused by
-
LPS-114155 URLs with character outside 7-bit ASCII are not working correctly in some internal portal redirects
- Closed