Skip to content

[JENKINS-75914] Do not mask empty secrets#378

Merged
jtnord merged 1 commit intojenkinsci:masterfrom
Kevin-CB:JENKINS-75914
Jul 22, 2025
Merged

[JENKINS-75914] Do not mask empty secrets#378
jtnord merged 1 commit intojenkinsci:masterfrom
Kevin-CB:JENKINS-75914

Conversation

@Kevin-CB
Copy link
Contributor

[JENKINS-75914] Do not mask empty secrets

Supersedes #377.

The issue encountered in JENKINS-75914 is due to the lack of handling for empty credentials.
A check is performed for normal messages on the console log

, but not for exceptions.

I'm adding this check before changing the type of exception, to avoid throwing a MaskedException when there's nothing to mask.

Testing done

I tested this change locally using the example provided in JENKINS-75914 and added a test to cover this case. The test fails without this change.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@Kevin-CB Kevin-CB requested a review from a team as a code owner July 22, 2025 16:39
@Kevin-CB Kevin-CB requested review from MarkEWaite and jtnord July 22, 2025 16:39
@jtnord jtnord added the bug label Jul 22, 2025
@jtnord jtnord enabled auto-merge July 22, 2025 16:52
@jtnord jtnord merged commit fe613e5 into jenkinsci:master Jul 22, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants