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

Inputs of type text or password automatically escape special characters like $ resulting in different password from pipeline input box.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The pipeline input step with an input of type text parameter or Password.

      Whenver the input contains special characters like $

      Text$txt

      The Text after $ is missing due to the plugin automatic variable subustitution resulting in faulty password or text being transfered to next stages

        Attachments

          Activity

          Hide
          lokeshdivi lokesh divi added a comment - - edited

          node('DOCKER'){
          stage('test'){
             userInput = input(id: 'userInput',
             message: 'Do you want to release this build?',
             parameters: [[$class: 'PasswordParameterDefinition',
                                   defaultValue: "",
                                   name: 'password',
                                   description: 'Password']])

             sh "echo User Input is" + userInput

           }
          }

          Show
          lokeshdivi lokesh divi added a comment - - edited node('DOCKER'){ stage('test'){    userInput = input(id: 'userInput',    message: 'Do you want to release this build?',    parameters: [[$class: 'PasswordParameterDefinition',                          defaultValue: "",                          name: 'password',                          description: 'Password']])    sh "echo User Input is" + userInput  } }
          Hide
          lokeshdivi lokesh divi added a comment - - edited

          If i enter the password with escape character like \ then it shows up correctly.

           

          SAI$lokesh1 – results in SAI

          SAI\$lokesh1 - results in SAI$lokesh1

          Show
          lokeshdivi lokesh divi added a comment - - edited If i enter the password with escape character like \ then it shows up correctly.   SAI$lokesh1 – results in SAI SAI\$lokesh1 - results in SAI$lokesh1

            People

            • Assignee:
              Unassigned
              Reporter:
              lokeshdivi lokesh divi
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: