Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.0.0
Description
Steps to reproduce
- Create a page with node name ä
- Fetch that page via REST: http://localhost:8080/magnoliaAuthor/.rest/nodes/v1/website/ä
Expected behaviour
HTTP status 200
Expected behaviour
HTTP status 404
Initial analysis
The root cause is RestDispatcherServlet constructing a not correctly URL encoded URL by using HttpServletRequest.getPathInfo, which returns a decoded string.
The following patch made the problem go away. There might be better ways to fix this thought.
@@ -197,7 +197,7 @@
EnvironmentContextPerThread.runInEnvironmentContext(environment, () -> onEnvironmentAdded(environment));
}
- final String relativePath = httpServletRequest.getPathInfo();
+ final String relativePath = StringUtils.substringAfter(httpServletRequest.getRequestURL().toString(), httpServletRequest.getServletPath());
HttpServletRequest environmentRequest = relativePath.startsWith("/environments") ? httpServletRequest :
new HttpServletRequestWrapper(httpServletRequest) {
@Override
Checklists
Acceptance criteria
Attachments
Issue Links
- causes
-
MGNLTEST-235 Cleanup fails to delete nodes with UTF8-chars in node-/file-name - failing silently!
-
- Closed
-
-
MGNLTEST-236 MagnoliaRestClient#nodeExists fails to figure the existence of node-names with UTF8-chars in the node name
-
- Closed
-