Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18174

Checking of unique Build Parameter names has a hole and only works within a single context

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Development

      In https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/BuildParametersContextHelper.groovy the buildParameterNodes.containsKey(parameterName) won't help if someone calls parameters a few times, since that check only works within a single Context. Ideally we should queue up all the buildParameterNodes and then replay only at the very end.

      See: https://github.com/jenkinsci/job-dsl-plugin/pull/50

          [JENKINS-18174] Checking of unique Build Parameter names has a hole and only works within a single context

          Even if there are checks across parameter contexts, there are still templates and configure blocks to be considered to be 100% sure to have only unique parameter definitions. Since the DSL does not do this level of checks for other features, I tend to close this as "won't fix" and actually remove the existing checks since they pretend false security.

          Daniel Spilker added a comment - Even if there are checks across parameter contexts, there are still templates and configure blocks to be considered to be 100% sure to have only unique parameter definitions. Since the DSL does not do this level of checks for other features, I tend to close this as "won't fix" and actually remove the existing checks since they pretend false security.

            jamietanna Jamie Tanna
            andrewharmellaw Andrew Harmel-Law
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: