Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.0 DXP GA1, 7.0.3 CE GA4, 7.0.0 DXP FP25, 7.0.0 DXP FP26, 7.0.X EE, Master
-
7.0.x
-
Committed
-
4
Description
Steps to reproduce
Preparation:
- Start the portal
- Log in with user
- Add a Language and a Tags Navigation portlet on the Welcome page
- Configure the Tags Navigation to display unused tags
- Add a new tag under Site -> Content -> Tags with a name "a tag" (important: it has to have a space in it)
Issue 1
- In the Tags Navigation, click on a tag, you'll get http://localhost:8080/web/guest/home/-/tag/a+tag
- Add de to the URL: http://localhost:8080/de/web/guest/home/-/tag/a+tag
- Notice the "Set German (Germany) as your preferred language" link at the top and click on it
Result: You're looking at a blank page with an exception in the log, for example:
WARNING [http-nio-8080-exec-7] org.apache.catalina.connector.Response.sendRedirect Failed to redirect to [http://localhost:8080/web/guest/home/-/tag/my tag] java.lang.IllegalArgumentException: Illegal character in path at index 45: http://localhost:8080/web/guest/home/-/tag/my tag at java.net.URI.create(URI.java:852) at org.apache.catalina.connector.Response.sendRedirect(Response.java:1280) at org.apache.catalina.connector.Response.sendRedirect(Response.java:1252) at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:500) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) at com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsResponse.sendRedirect(AbsoluteRedirectsResponse.java:46) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138) at com.liferay.portal.kernel.servlet.MetaInfoCacheServletResponse.sendRedirect(MetaInfoCacheServletResponse.java:424) at com.liferay.portal.action.UpdateLanguageAction.execute(UpdateLanguageAction.java:143) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) (...) Caused by: java.net.URISyntaxException: Illegal character in path at index 45: http://localhost:8080/web/guest/home/-/tag/my tag at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parseHierarchical(URI.java:3105) at java.net.URI$Parser.parse(URI.java:3053) at java.net.URI.<init>(URI.java:588) at java.net.URI.create(URI.java:850) ... 123 more
Issue 2
- Go the Welcome page and click on the USA flag in the language portlet
- Go to http://localhost:8080/de/web/guest/home?param1=something%26paramparam=something
- Click on the "Set German (Germany) as your preferred language"
Expected result: You're taken to /web/guest/home?param1=something%26paramparam=something
Actual result: You're taken to /web/guest/home?param1=something*&*paramparam=something
Meaning: The percent-encoded ampersand gets de-coded, meaning, the original value of "param1" has changed
Technical Notes: The root cause of Issue 1 and Issue 2 is the same, the redirect is not encoded properly
Attachments
Issue Links
- is duplicated by
-
LPS-72693 Some search bar parameters return invalid results
- Closed