* Prevent response splitting vulnerability reported by
Paul Alexandrow on helma-dev.
This commit is contained in:
parent
54617d09c1
commit
2721d55139
1 changed files with 6 additions and 4 deletions
|
@ -442,8 +442,9 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
* @throws RedirectException ...
|
||||
*/
|
||||
public void redirect(String url) throws RedirectException {
|
||||
redir = url;
|
||||
throw new RedirectException(url);
|
||||
redir = url == null ?
|
||||
null : url.replaceAll("[\r\n]", "");
|
||||
throw new RedirectException(redir);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -463,8 +464,9 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
* @throws RedirectException ...
|
||||
*/
|
||||
public void forward(String url) throws RedirectException {
|
||||
forward = url;
|
||||
throw new RedirectException(url);
|
||||
forward = url == null ?
|
||||
null : url.replaceAll("[\r\n]", "");
|
||||
throw new RedirectException(forward);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue