zhangshenghang opened a new pull request, #6092:
URL: https://github.com/apache/shenyu/pull/6092
When JWT value contains dot notation (e.g., user.name) to access nested
properties, the DefaultJwtConvertStrategy.addHeader() method adds HTTP headers
twice.
**Cause:**
```java
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](https://shenyu.apache.org/community/contributor-guide).
- [ ] You submit test cases (unit or integration tests) that back your
changes.
- [ ] Your local test passed `./mvnw clean install
-Dmaven.javadoc.skip=true`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]