From d8e6732b7e285cf17c8ba446611f6cfd6dbeff4e Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 1 Aug 2014 11:05:54 -0400 Subject: [PATCH] Added @RequirePOST in a couple of places where it was missing. --- core/src/main/java/hudson/model/Executor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index 4353ad7546..13d905d362 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -196,7 +196,6 @@ public class Executor extends Thread implements ModelObject { public void run() { startTime = System.currentTimeMillis(); - // run as the system user. see ACL.SYSTEM for more discussion about why this is somewhat broken ACL.impersonate(ACL.SYSTEM); try { @@ -507,6 +506,7 @@ public class Executor extends Thread implements ModelObject { * * @since 1.489 */ + @RequirePOST public HttpResponse doStop() { Queue.Executable e = executable; if(e!=null) { @@ -519,6 +519,7 @@ public class Executor extends Thread implements ModelObject { /** * Throws away this executor and get a new one. */ + @RequirePOST public HttpResponse doYank() { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); if (isAlive())