Skip to content

Validate authorization-code token parameters#19242

Open
goutamadwant wants to merge 1 commit into
spring-projects:mainfrom
goutamadwant:gh-19227
Open

Validate authorization-code token parameters#19242
goutamadwant wants to merge 1 commit into
spring-projects:mainfrom
goutamadwant:gh-19227

Conversation

@goutamadwant
Copy link
Copy Markdown

Closes gh-19227

This validates the authorization-code token request parameters that are copied into confidential client authentication before they are stored as additional parameters.

Duplicate code or code_verifier values now fail with invalid_request instead of being carried as String[] values into PKCE validation. Repeated custom extension parameters are still preserved.

Tests:

./gradlew :spring-security-oauth2-authorization-server:test --tests ClientSecretBasicAuthenticationConverterTests --tests ClientSecretPostAuthenticationConverterTests
./gradlew --no-build-cache --rerun-tasks :spring-security-oauth2-authorization-server:test
./gradlew format && ./gradlew check

Closes spring-projectsgh-19227

Signed-off-by: goutamadwant <workwithgoutam@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClassCastException (HTTP 500) on /oauth2/token when single-value parameters are duplicated

2 participants