提交 96bae19e 编写于 作者: M mindless

[HUDSON-4344] urlencode name when redirecting to rename?newName=..


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21208 71c3de6d-444a-0410-be80-ed276b4c234a
上级 427dd0fd
......@@ -60,6 +60,7 @@ import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
......@@ -937,7 +938,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
sendError(e, req, rsp);
return;
}
rsp.sendRedirect("rename?newName=" + newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
......@@ -1173,7 +1174,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
if (isBuilding()) {
// redirect to page explaining that we can't rename now
rsp.sendRedirect("rename?newName=" + newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册