Skip to content

Commit

Permalink
fixed issue security-993
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantvq committed Jun 5, 2019
1 parent 7d833b2 commit a2a6986
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -24,6 +24,7 @@

import javax.xml.datatype.DatatypeConfigurationException;

import jenkins.model.Jenkins;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

Expand All @@ -41,6 +42,7 @@
import com.thed.zephyr.jenkins.utils.rest.Release;
import com.thed.zephyr.jenkins.utils.rest.RestClient;
import com.thed.zephyr.jenkins.utils.rest.ServerInfo;
import org.kohsuke.stapler.verb.POST;

@Extension
public final class ZeeDescriptor extends BuildStepDescriptor<Publisher> {
Expand Down Expand Up @@ -166,11 +168,12 @@ public String getDisplayName() {
// }
// }

@POST
public FormValidation doTestConnection(
@QueryParameter String serverAddress,
@QueryParameter String username, @QueryParameter String password) {


Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
if (StringUtils.isBlank(serverAddress)) {
return FormValidation.error("Please enter the server name");
}
Expand Down

0 comments on commit a2a6986

Please sign in to comment.