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

passwords are not removed in some cases

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      In some cases, passwords are not removed from the output. See example - password TestProjectTest_Password is not removed in the beginning of the output, but removed in further output

      Started by user Andrei F
      [EnvInject] - Preparing an environment for the job.
      Building remotely on csharp4_windows
      [copy-to-slave] Copying 'TestProject/*/', excluding nothing, from 'file:/C:/Websites/hudson/userContent/' on the master to 'file:/c:/dev/workspace/TestProject_Testing/' on 'csharp4_windows'.
      [EnvInject] - Injecting as environment variables the properties content
      TestProjectTest_UserName=MyUserName
      TestProjectTest_Password=MyUserPassword

      Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
      Executing command: cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /P:TestProjectTest_Password=******** TestProject/test.xml && exit %%ERRORLEVEL%%
      [TestProject_Testing] $ cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /P:TestProjectTest_Password=******** TestProject/test.xml && exit %%ERRORLEVEL%%
      Microsoft (R) Build Engine Version 4.0.30319.1
      [Microsoft .NET Framework, Version 4.0.30319.1]
      Copyright (C) Microsoft Corporation 2007. All rights reserved.

      Build started 12/19/2011 12:03:01 PM.

        Attachments

          Issue Links

            Activity

            Hide
            rseguy Romain Seguy added a comment -

            Can you precise what are "some cases"?
            I've tried to reproduce the issue but failed: I've enabled the "Mask passwords (and enable global passwords)" option and added an entry there whose password field is set to "MyUserPassword". Then, I've enabled "Inject environment variables to the build process" and set "Properties Content" to "XXX=MyUserPassword". The output I get is this one:

            [EnvInject] - Executing scripts and injecting environment variables after the SCM step.
            [EnvInject] - Injecting as environment variables the properties content 
            XXX=********
            
            [EnvInject] - Variables injected successfully.
            [EnvInject] - Unset unresolved 'PROMPT' variable.
            [workspace] $ cmd /c call D:\DOCUME~1\F276977\LOCALS~1\Temp\hudson4463275677839902387.bat
            
            D:\jenkins-src\jenkins-plugins\mask-passwords\work\jobs\xx\workspace>echo ******** 
            ********
            
            D:\jenkins-src\jenkins-plugins\mask-passwords\work\jobs\xx\workspace>exit 0 
            Finished: SUCCESS
            

            ==> The password is masked everywhere.

            Anyway, I've tried a blind fix. Can you test if it works with the attached plugin (2.7.3-SNAPSHOT)?

            Show
            rseguy Romain Seguy added a comment - Can you precise what are "some cases"? I've tried to reproduce the issue but failed: I've enabled the "Mask passwords (and enable global passwords)" option and added an entry there whose password field is set to "MyUserPassword". Then, I've enabled "Inject environment variables to the build process" and set "Properties Content" to "XXX=MyUserPassword". The output I get is this one: [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content XXX=******** [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'PROMPT' variable. [workspace] $ cmd /c call D:\DOCUME~1\F276977\LOCALS~1\Temp\hudson4463275677839902387.bat D:\jenkins-src\jenkins-plugins\mask-passwords\work\jobs\xx\workspace>echo ******** ******** D:\jenkins-src\jenkins-plugins\mask-passwords\work\jobs\xx\workspace>exit 0 Finished: SUCCESS ==> The password is masked everywhere. Anyway, I've tried a blind fix. Can you test if it works with the attached plugin (2.7.3-SNAPSHOT)?
            Hide
            rseguy Romain Seguy added a comment -

            Will be delivered in 2.7.3

            Show
            rseguy Romain Seguy added a comment - Will be delivered in 2.7.3
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rseguy
            Path:
            src/main/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsBuildWrapper.java
            http://jenkins-ci.org/commit/mask-passwords-plugin/b2ebd334f3ab11e2c575d1341f1aeaa163a55927
            Log:
            [FIXED JENKINS-12161] env-inject vars may not be masked because of plugins loading order

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rseguy Path: src/main/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsBuildWrapper.java http://jenkins-ci.org/commit/mask-passwords-plugin/b2ebd334f3ab11e2c575d1341f1aeaa163a55927 Log: [FIXED JENKINS-12161] env-inject vars may not be masked because of plugins loading order

              People

              • Assignee:
                rseguy Romain Seguy
                Reporter:
                fandrei Andrei F
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: