-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
jenkins 2.86-SNAPSHOT
TestCase #1:
- Go to /jenkins/configure page
- Set "# of executors" == any line, not a number
Expected result: Validation error -Not a number
Actual result: No validation error - Click Apply
Expected result: Validation error -Not a number. New configuration was not saved.
Actual result: Error page:net.sf.json.JSONException: JSONObject["numExecutors"] is not a number. at net.sf.json.JSONObject.getDouble(JSONObject.java:1948) at net.sf.json.JSONObject.getInt(JSONObject.java:1967) at jenkins.model.MasterBuildConfiguration.configure(MasterBuildConfiguration.java:54) at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3715) at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3679) ..........
---------------------------------------------------
TestCase #2:
- Go to /jenkins/configure page
- Set "# of executors" == any negative number
Expected result == Actual result: Validation error -Not a number
- Click Apply
Expected result: Validation error -Not a number. New configuration was not saved.
Actual result: New configuration saved.
Code changed in jenkins
User: Kseniia Nenasheva
Path:
core/src/main/java/hudson/model/Computer.java
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/MasterBuildConfiguration.java
core/src/main/resources/jenkins/model/Jenkins/MasterComputer/configure.jelly
core/src/main/resources/jenkins/model/MasterBuildConfiguration/config.groovy
core/src/main/resources/jenkins/model/Messages.properties
war/src/main/webapp/scripts/hudson-behavior.js
http://jenkins-ci.org/commit/jenkins/2eda7816e8007851ced3d618cd0fe42c78a486e2
Log:
JENKINS-47793- Jenkins master and agent configuration pages do not verify negative executor numbers (#3141)