• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • envinject-plugin
    • EnvInject 1.78
      Jenkins 1.489

      Build with password parameter is malformed when "Prepare an environment for the run" is enabled.

      1. Create job with password parameter
      2. Tick "Prepare an environment for the run"
      3. Add script build step which prints out password parameter

      Current result: password hash is passed to the script instead of password
      Expected result: password should be passed to the script

          [JENKINS-16372] Password parameter is malformed

          Gregory Boissinot added a comment - - edited

          In the Jenkins log, password values provided by EnvInject plugin are masked. However, from the script they are decrypted.
          For example, test in your script 'echo $1 > out.txt' and call your script with $PASSWORD_VAR and you should see that you have the plain value of the var.

          Gregory Boissinot added a comment - - edited In the Jenkins log, password values provided by EnvInject plugin are masked. However, from the script they are decrypted. For example, test in your script 'echo $1 > out.txt' and call your script with $PASSWORD_VAR and you should see that you have the plain value of the var.

          I created Windows batch script in Jenkins:
          echo %password% > out.txt
          and my out.txt looks like:
          aUZfmW1sIV8Cf1ylDYbisNAlvHM5BIFcWQh6DOBXpt4=

          Mateusz Balbus added a comment - I created Windows batch script in Jenkins: echo %password% > out.txt and my out.txt looks like: aUZfmW1sIV8Cf1ylDYbisNAlvHM5BIFcWQh6DOBXpt4=

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
          src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java
          http://jenkins-ci.org/commit/envinject-plugin/fffef515df17d3422c4c7b8bf0d719436b52bfab
          Log:
          Fix JENKINS-16372

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/cbbe52face74...fffef515df17


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java http://jenkins-ci.org/commit/envinject-plugin/fffef515df17d3422c4c7b8bf0d719436b52bfab Log: Fix JENKINS-16372 Compare: https://github.com/jenkinsci/envinject-plugin/compare/cbbe52face74...fffef515df17 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          Verified on version 1.81, works fine. Did you notice that now password is visible in logs? I'm guessing it is core issue now.

          Mateusz Balbus added a comment - Verified on version 1.81, works fine. Did you notice that now password is visible in logs? I'm guessing it is core issue now.

          Yes, it seems to be a core issue.

          Gregory Boissinot added a comment - Yes, it seems to be a core issue.

            gbois Gregory Boissinot
            balbusm Mateusz Balbus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: