-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-74018] Migrate legacy checkUrl
attributes in BapSshTransfer/config.jelly
#360
Conversation
@@ -53,26 +53,26 @@ | |||
return FormValidation.validateNonNegativeInteger(value); | |||
} | |||
|
|||
public FormValidation doCheckSourceFiles(@QueryParameter final String configName, @QueryParameter final String sourceFiles, | |||
public FormValidation doCheckSourceFiles(@QueryParameter final String sourceFilesConfigName, @QueryParameter final String value, |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
@@ -53,26 +53,26 @@ | |||
return FormValidation.validateNonNegativeInteger(value); | |||
} | |||
|
|||
public FormValidation doCheckSourceFiles(@QueryParameter final String configName, @QueryParameter final String sourceFiles, | |||
public FormValidation doCheckSourceFiles(@QueryParameter final String sourceFilesConfigName, @QueryParameter final String value, |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
} | ||
|
||
public FormValidation doCheckPatternSeparator(@QueryParameter final String value) { | ||
return BPValidators.validateRegularExpression(value); | ||
} | ||
|
||
public FormValidation doCheckExecCommand(@QueryParameter final String sourceFiles, @QueryParameter final String execCommand) { | ||
return checkTransferSet(sourceFiles, execCommand); | ||
public FormValidation doCheckExecCommand(@QueryParameter final String sourceFiles, @QueryParameter final String value) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
} | ||
|
||
public FormValidation doCheckPatternSeparator(@QueryParameter final String value) { | ||
return BPValidators.validateRegularExpression(value); | ||
} | ||
|
||
public FormValidation doCheckExecCommand(@QueryParameter final String sourceFiles, @QueryParameter final String execCommand) { | ||
return checkTransferSet(sourceFiles, execCommand); | ||
public FormValidation doCheckExecCommand(@QueryParameter final String sourceFiles, @QueryParameter final String value) { |
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
https://issues.jenkins.io/browse/JENKINS-74018
checkUrl
attribute from the affected fields and renamed the parameter names in validation methods to let CheckMethod do all the work.poj:textarea
withf:textarea
.poj:textarea
is provided by https://plugins.jenkins.io/publish-over/ which had it's last release 7 years ago. It doesn't have some of the attributes that modernf:textarea
has, and also stands out visually from the rest of the fields. This change is probably not needed for the form validation to work properly withoutcheckUrl
attribute, I haven't checked. Let me know if I should revert this to keep the PR clean.Testing done
Configure an SSH server on the Global Configuration page. Create a new freestyle job, in the Environment section check "Send files or execute commands over SSH before the build starts". In Transfer Set section fill Source files and Exec command fields to trigger the affected validation methods.
Before the change
After the change
Submitter checklist