jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-43264] NullPointerException when credentialsId is null
- Dominant language
- Java
- Stars
- 57
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
with the following:
{{ steps {}}
{{ withCredentials([}}
{{ string(credentialsId: params.GITHUB_PASSWORD, variable: 'GITHUB_PASSWORD'),}}
{{ string(credentialsId: params.GITHUB_APP_SECRET, variable: 'GITHUB_APP_SECRET')}}
]) {
ansiblePlaybook( {{ }}
...
)
{{ }}}
{{ }}}
if param.GITHUB_PASSWORD is null (not defined), a NullPointerException is raised.
The code in com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById should check for null value of id and provide a more useful message than a stacktrace.
---
Originally reported by jouve, imported from: NullPointerException when credentialsId is null
Raw content of original issue
with the following:
{{ steps {}}
{{ withCredentials([}}
{{ string(credentialsId: params.GITHUB_PASSWORD, variable: 'GITHUB_PASSWORD'),}}
{{ string(credentialsId: params.GITHUB_APP_SECRET, variable: 'GITHUB_APP_SECRET')}}
]) {
ansiblePlaybook( {{ }}
...
)
{{ }}}
{{ }}}
if param.GITHUB_PASSWORD is null (not defined), a NullPointerException is raised.
The code in com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById should check for null value of id and provide a more useful message than a stacktrace.
- environment:
see attached about.html
1 attachment
- [about.html](https://issues.jenkins.io/secure/attachment/36840/about.html)
Contributor guide
Assessment
This issue has not been assessed yet.