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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: job-dsl-plugin
    • Labels:
      None
    • Environment:
      Development
    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          daspilker 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.

          Show
          daspilker 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.

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              andrewharmellaw Andrew Harmel-Law
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: