Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the cases where url are sent in headers we dont must to sanitize it. #735

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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