[SECURITY-63] Require POST for running Groovy scripts.

This commit is contained in:
Jesse Glick committed 2013-04-24 18:02:49 -04:00
1 parent 64ff047094
commit 3bbb65df3a
4 files changed
+50 -36
Notes: Kohsuke Kawaguchi 2013-05-01 18:59:00 -07:00
[FIXED SECURITY-63]

No files matched your search

@@ -97,21 +97,7 @@ public final class MavenProbeAction implements Action {
}
public void doScript( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
// ability to run arbitrary script is dangerous,
// so tie it to the admin access
owner.checkPermission(Jenkins.RUN_SCRIPTS);
String text = req.getParameter("script");
if(text!=null) {
try {
req.setAttribute("output",
RemotingDiagnostics.executeGroovy(text,channel));
} catch (InterruptedException e) {
throw new ServletException(e);
}
}
req.getView(this,"_script.jelly").forward(req,rsp);
Jenkins._doScript(req, rsp, req.getView(this, "_script.jelly"), channel, owner.getACL());
}
/**