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.

      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

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

          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

           }
          }

          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  } }

          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

          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

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

              Created:
              Updated: