gnodet opened a new pull request, #2953:
URL: https://github.com/apache/cxf/pull/2953

   ## Summary
   
   Fixes two bugs in `ModelEncryptionSupport` that made 
`DefaultEncryptingOAuthDataProvider` practically unusable:
   
   1. **Null values serialized as spaces**: `tokenizeString(null)` returned `" 
"` (space), so `new Client("clientId", null, false)` would deserialize with 
`clientSecret = " "` instead of `null`
   2. **Collections serialized with brackets and spaces**: Using 
`List.toString()` produced `[openid, email]`, and `parseSimpleList` would strip 
the brackets but leave spaces, resulting in `" email"` instead of `"email"`
   
   ### Changes
   
   - `tokenizeString`: returns `""` instead of `" "` for null
   - `getStringPart`: checks for `""` instead of `" "` 
   - New `tokenizeCollection`/`tokenizeMap` helpers replace direct 
`.toString()` calls
   - `parseSimpleList`/`parseSimpleMap`: simplified to work with 
comma-separated values without brackets
   - All `split()` calls use `-1` limit to preserve trailing empty strings
   - `parseSimpleMap`: added empty check to avoid NPE on empty strings
   - Applied `getStringPart` to client id/secret in `recreateClientInternal`
   
   Supersedes #816. A JIRA ticket should be created for this fix.
   
   ## Test plan
   
   - [x] Added `testPublicClient` test — verifies null secret round-trips 
correctly
   - [x] All existing `CryptoUtilsTest` tests pass
   - [ ] CI verification
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to