Skip to content

Commit 8954b3a

Browse files
Wadeckdaniel-beck
authored andcommitted
[SECURITY-1094]
1 parent 4e2870f commit 8954b3a

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

src/main/java/hudson/scm/browsers/FishEyeCVS.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import jenkins.model.Jenkins;
3636
import org.kohsuke.stapler.DataBoundConstructor;
3737
import org.kohsuke.stapler.QueryParameter;
38+
import org.kohsuke.stapler.interceptor.RequirePOST;
3839

3940
import javax.servlet.ServletException;
4041
import java.io.IOException;
@@ -84,6 +85,7 @@ public String getDisplayName() {
8485
return "FishEye";
8586
}
8687

88+
@RequirePOST
8789
public FormValidation doCheckUrl(@QueryParameter String value) throws IOException, ServletException {
8890
value = Util.fixEmpty(value);
8991
if (value == null) return FormValidation.ok();

src/main/java/hudson/scm/cvstagging/CvsTagAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.kohsuke.stapler.StaplerResponse;
3939
import org.kohsuke.stapler.export.Exported;
4040
import org.kohsuke.stapler.export.ExportedBean;
41+
import org.kohsuke.stapler.interceptor.RequirePOST;
4142

4243
import javax.servlet.ServletException;
4344
import java.io.IOException;
@@ -106,6 +107,7 @@ public AbstractCvs getParent() {
106107
return parentScm;
107108
}
108109

110+
@RequirePOST
109111
public synchronized void doSubmit(final StaplerRequest request, final StaplerResponse response) throws IOException,
110112
ServletException {
111113
// check the user is allowed to tag

src/main/java/hudson/scm/cvstagging/LegacyTagAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.kohsuke.stapler.StaplerRequest;
3737
import org.kohsuke.stapler.StaplerResponse;
3838
import org.kohsuke.stapler.export.Exported;
39+
import org.kohsuke.stapler.interceptor.RequirePOST;
3940
import org.netbeans.lib.cvsclient.Client;
4041
import org.netbeans.lib.cvsclient.command.GlobalOptions;
4142
import org.netbeans.lib.cvsclient.command.tag.TagCommand;
@@ -137,6 +138,7 @@ public boolean isTagged() {
137138
/**
138139
* Invoked to actually tag the workspace.
139140
*/
141+
@RequirePOST
140142
@SuppressWarnings("unchecked")
141143
public synchronized void doSubmit(final StaplerRequest req,
142144
final StaplerResponse rsp) throws IOException,

src/main/resources/hudson/scm/browsers/FishEyeCVS/config.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ THE SOFTWARE.
2525
<?jelly escape-by-default='true'?>
2626
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
2727
<f:entry title="URL" field="url">
28-
<f:textbox />
28+
<f:textbox checkMethod="post"/>
2929
</f:entry>
3030
</j:jelly>

src/main/resources/hudson/scm/cvstagging/CvsTagAction/tagForm.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ THE SOFTWARE.
3232

3333
<d:taglib uri="local">
3434
<d:tag name="tagForm">
35-
<form action="submit" method="get">
35+
<form action="submit" method="post">
3636
<j:set var="descriptor" value="${it.descriptor}" />
3737

3838
<table>

src/main/resources/hudson/scm/cvstagging/LegacyTagAction/tagForm.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ THE SOFTWARE.
3232

3333
<d:taglib uri="local">
3434
<d:tag name="tagForm">
35-
<form action="submit" method="get">
35+
<form action="submit" method="post">
3636
<j:set var="descriptor" value="${it.descriptor}" />
3737

3838
<table>

0 commit comments

Comments
 (0)