-
Bug
-
Resolution: Fixed
-
Major
-
None
The implementation of registerValidator() in hudson-behavior.js blindly pushes content from the Job configuration (attribute=checkUrl) into an eval() if the attribute "checkDependsOn" is absent.
In cases where a plugin has no JavaScript in "checkUrl" but a plain URL String the eval() call fails as the content is interpreted as RegEx with invalid flags.
Here is the current code in Question at line 414 to 424:
var url = this.getAttribute("checkUrl"); var depends = this.getAttribute("checkDependsOn"); if (depends==null) {// legacy behaviour where checkUrl is a JavaScript return eval(url); // need access to 'this', so no 'geval' } else { //...
A simple fix to prevent the breakdown of the overall Job Configuration could be achieved as follows:
var url = this.getAttribute("checkUrl"); var depends = this.getAttribute("checkDependsOn"); if (depends==null) {// legacy behaviour where checkUrl is a JavaScript try { return eval(url); // need access to 'this', so no 'geval' } catch(e) { return url; // if the URL is not JavaScript, simply return the URL } } else { //...
This fix or a similar approach would make the UI more robust and less fragile, especially as the core application relies on external (plugin) code.
- duplicates
-
JENKINS-6542 "LOADING" overlay
- Resolved
- is blocking
-
JENKINS-11074 LOADING Overlay does not go away - IE 8
- Resolved
- is duplicated by
-
JENKINS-19248 regression: Upgrading to 1.528 ("Upgrade Automatically") breaks "configure"
- Resolved
-
JENKINS-19421 Jenkins 1.529 upgrade breaks the ability to edit existing jenkins jobs / Creating new jenkins jobs
- Resolved
-
JENKINS-19366 Configure tab freezes for projects
- Resolved