Skip to content

Commit

Permalink
In the cases where url are sent in headers we dont must to sanitize it.
Browse files Browse the repository at this point in the history
Issue: 103288
  • Loading branch information
iroqueta committed Jun 20, 2023
1 parent 03c8f6b commit 3299bb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ public void redirect_impl(String url, IGXWindow win) {

if (isSpaRequest(true)) {
pushUrlSessionStorage();
getResponse().setHeader(GX_SPA_REDIRECT_URL, url + popLvlParm);
getResponse().setHeader(GX_SPA_REDIRECT_URL, url + popLvlParm, false);
sendCacheHeaders();
} else {
redirect_http(url + popLvlParm);
Expand Down
4 changes: 2 additions & 2 deletions java/src/main/java/com/genexus/webpanels/HttpContextWeb.java
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ protected void redirect_http(String url) {
} else {
pushUrlSessionStorage();
if (useCustomRedirect()) {
getResponse().setHeader("Location", url);
getResponse().setHeader("Location", url, false);
getRequest().setAttribute("gx_webcall_method", "customredirect");
getResponse().setStatus(HttpServletResponse.getSC_MOVED_TEMPORARILY());
} else {
Expand All @@ -1336,7 +1336,7 @@ private void doRedirect(String url) throws IOException {
getRequest().setAttribute("gx_webcall_method", "redirect");
// getResponse().sendRedirect(url); No retornamos 302 sino 301, debido al SEO.
response.setStatus(HttpServletResponse.getSC_MOVED_PERMANENTLY());
response.setHeader("Location", url);
response.setHeader("Location", url, false);
sendCacheHeaders();
}

Expand Down

0 comments on commit 3299bb2

Please sign in to comment.