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

EnvInject mask passwords interferes with timestamper

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using EnvInject's option
      "Inject passwords to the build as environment variables" with password parameter masking
      and timestamper the timestamps in the console log are shifted by two lines (and the last two lines don'T have timestamps).
      These two lines are probably
      [EnvInject] - Inject global passwords.
      [EnvInject] - Mask passwords passed as build parameters.

      But why do they cause a shift?

      The second problem ist, when viewing the log while the job is still running newly added lines do not get timestamps. I have to reload the page to see timestamps.

      Both problems are gone for jobs without EnvInject passwords.

        Attachments

          Activity

          Hide
          stevengbrown Steven G Brown added a comment -

          Thanks for the clarification, Lars. I've submitted a pull request to fix it: https://github.com/jenkinsci/envinject-plugin/pull/87

          Show
          stevengbrown Steven G Brown added a comment - Thanks for the clarification, Lars. I've submitted a pull request to fix it: https://github.com/jenkinsci/envinject-plugin/pull/87
          Hide
          wolterhis Lars added a comment -

          But no one seems to care about merging and releasing it

          Show
          wolterhis Lars added a comment - But no one seems to care about merging and releasing it
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Steven Brown
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper.java
          src/test/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordTest.java
          http://jenkins-ci.org/commit/envinject-plugin/f56667ca7a5ee60e90fb2e1c7fc752b16605fd2e
          Log:
          [FIXED JENKINS-30028] Remove logging from password wrapper decorateLogger

          Move it into the setUp method instead. Writing to the OutputStream within
          the decorateLogger method causes the written message to bypass the other
          build wrappers, which have not yet wrapped the OutputStream.

          For example, it prevents the Timestamper plugin from applying timestamps
          to these lines.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Brown Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper.java src/test/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordTest.java http://jenkins-ci.org/commit/envinject-plugin/f56667ca7a5ee60e90fb2e1c7fc752b16605fd2e Log: [FIXED JENKINS-30028] Remove logging from password wrapper decorateLogger Move it into the setUp method instead. Writing to the OutputStream within the decorateLogger method causes the written message to bypass the other build wrappers, which have not yet wrapped the OutputStream. For example, it prevents the Timestamper plugin from applying timestamps to these lines.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: StevenGBrown
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper.java
          src/test/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordTest.java
          http://jenkins-ci.org/commit/envinject-plugin/586ec0829bd676ec5b2e64b2133a9931ee1cf678
          Log:
          Merge pull request #87 from StevenGBrown/JENKINS-30028

          [FIXED JENKINS-30028] Remove logging from password wrapper decorateLogger

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/80b96650c0a4...586ec0829bd6

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: StevenGBrown Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordWrapper.java src/test/java/org/jenkinsci/plugins/envinject/EnvInjectPasswordTest.java http://jenkins-ci.org/commit/envinject-plugin/586ec0829bd676ec5b2e64b2133a9931ee1cf678 Log: Merge pull request #87 from StevenGBrown/ JENKINS-30028 [FIXED JENKINS-30028] Remove logging from password wrapper decorateLogger Compare: https://github.com/jenkinsci/envinject-plugin/compare/80b96650c0a4...586ec0829bd6
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Released in 1.93

          Show
          oleg_nenashev Oleg Nenashev added a comment - Released in 1.93

            People

            • Assignee:
              stevengbrown Steven G Brown
              Reporter:
              wolterhis Lars
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: