Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom parameters to authorize and logout endpoints #480
base: master
Are you sure you want to change the base?
Add custom parameters to authorize and logout endpoints #480
Changes from all commits
8bfa4cc
e33fadb
4ceb342
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 1 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
checkstyle:check
Check warning on line 48 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
Partially covered line
Check warning on line 49 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
Not covered line
Check warning on line 49 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java#L49
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jtnord - I added some more test cases and encountered for LogoutQueryParameters a NPE when the value is null.
Is this solution OK for you?
In case the
this.value
should then benull
, then allgetValue()
needs to be covered as well.Check warning on line 76 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
Not covered line
Check warning on line 76 in src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java
src/main/java/org/jenkinsci/plugins/oic/AbstractKeyValueDescribable.java#L76
Check warning on line 1 in src/main/java/org/jenkinsci/plugins/oic/AbstractQueryParameter.java
checkstyle:check
Check warning on line 1 in src/main/java/org/jenkinsci/plugins/oic/LoginQueryParameter.java
checkstyle:check
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing sensitive here.
Whilst we could add a permission check we are only doing string comparisons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtnord Unfortunately, I do not know how to resolve all the problems found by the github-advanced-security. Can you help me here or step in? That would be great.
Also there is already one dismissed problem. Dunno who or how this got dismissed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can take a look.
I dismissed one as a false positive. (
key
was not sensitive in that context)Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
Check warning on line 1 in src/main/java/org/jenkinsci/plugins/oic/LogoutQueryParameter.java
checkstyle:check
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
Check warning on line 619 in src/main/java/org/jenkinsci/plugins/oic/OicSecurityRealm.java
Partially covered line
Check warning on line 1324 in src/main/java/org/jenkinsci/plugins/oic/OicSecurityRealm.java
Partially covered line