Skip to content

Commit 655eab9

Browse files
author
Bastian Germann
committed
Only allow POST verb on VM control submit
This addresses SECURITY-1764 additionally to d6a07fe ("Add missing permission checks to list box model functions"). Signed-off-by: Bastian Germann <[email protected]> Reviewed-by: Benedikt Spranger <[email protected]>
1 parent 7c545b5 commit 655eab9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Unreleased
77
- Fix [JENKINS-64698](https://issues.jenkins.io/browse/JENKINS-64698A):
88
Cannot create a libvirt agent
99
(Thanks to Benoit Guerin for the contribution)
10+
- Fix SECURITY-1764:
11+
Missing CSRF protection allows to shutdown cloud nodes
12+
(Thanks to Wadeck Follonier for the report)
1013

1114
### 1.9.0
1215

src/main/java/hudson/plugins/libvirt/VirtualMachineManagementServer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.kohsuke.stapler.QueryParameter;
1313
import org.kohsuke.stapler.StaplerRequest;
1414
import org.kohsuke.stapler.StaplerResponse;
15+
import org.kohsuke.stapler.verb.POST;
1516

1617
import javax.servlet.ServletException;
1718

@@ -60,6 +61,7 @@ public String getJsUrl(String jsName) {
6061
return Consts.PLUGIN_JS_URL + jsName;
6162
}
6263

64+
@POST
6365
public void doControlSubmit(@QueryParameter("stopId") String stopId, StaplerRequest req, StaplerResponse rsp) throws ServletException,
6466
IOException,
6567
InterruptedException, VirtException {

0 commit comments

Comments
 (0)