Skip to content

Commit 42dc83b

Browse files
committed
Fixed security scan warnings
1 parent 70935bc commit 42dc83b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/java/jenkins/plugins/jclouds/compute/JCloudsCloud.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@ public FormValidation doTestConnection(
997997

998998
@POST
999999
public FormValidation doCheckCloudGlobalKeyId(@QueryParameter String value) {
1000+
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
10001001
FormValidation ret = FormValidation.validateRequired(value);
10011002
if (ret.equals(FormValidation.ok())) {
10021003
StandardUsernameCredentials suc = CredentialsHelper.getCredentialsById(value);

src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,9 @@ public FormValidation doCheckName(@QueryParameter String value) {
848848
}
849849
}
850850

851+
@POST
851852
public FormValidation doCheckCores(@QueryParameter String value) {
853+
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
852854
FormValidation ret = FormValidation.validateRequired(value);
853855
if (ret == FormValidation.ok()) {
854856
try {
@@ -877,6 +879,7 @@ public FormValidation doCheckCores(@QueryParameter String value) {
877879
return ret;
878880
}
879881

882+
@POST
880883
public FormValidation doCheckRam(@QueryParameter String value) {
881884
return FormValidation.validateNonNegativeInteger(value);
882885
}

0 commit comments

Comments
 (0)