Skip to content

Conversation

@zhangshenghang
Copy link
Member

When JWT value contains dot notation (e.g., user.name) to access nested properties, the DefaultJwtConvertStrategy.addHeader() method adds HTTP headers twice.

Cause:

if (converter.getJwtVal().contains(".")) {
    headers.add(headerVal, parse(...)); // adds correct value
}
headers.add(headerVal, body.get(jwtVal)); // always executes, adds null

Result:

Expected: username: ["john"]
Actual: username: ["john", "null"]

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

@Aias00 Aias00 merged commit b829f16 into apache:master Aug 8, 2025
43 checks passed
@Aias00 Aias00 added this to the 2.7.0.2 milestone Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants