Skip to content

Commit

Permalink
Fix SECURITY-1025
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed Oct 31, 2023
1 parent 9ea84d5 commit 49a1a8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/hudson/plugins/batch_task/BatchTaskInvoker.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.verb.POST;

import java.io.IOException;
import java.io.PrintStream;
Expand Down Expand Up @@ -145,6 +146,7 @@ public ListBoxModel doFillTaskItems(@QueryParameter String project, @AncestorInP
}

@Restricted(NoExternalUse.class)
@POST
public FormValidation doCheckProject(@QueryParameter String project) {
if (project.startsWith("/")) {
return FormValidation.warning(Messages.BatchTaskInvoker_ForwardSlash());
Expand All @@ -160,6 +162,7 @@ public FormValidation doCheckProject(@QueryParameter String project) {
}

@Restricted(NoExternalUse.class)
@POST
public FormValidation doCheckTask(@QueryParameter String project, @QueryParameter String task) {
if (!project.isEmpty() && task.isEmpty()) {
return FormValidation.warning(Messages.BatchTaskInvoker_NoBatchTaskExists(task));
Expand Down

0 comments on commit 49a1a8d

Please sign in to comment.