pyshiweijia opened a new pull request, #8170: URL: https://github.com/apache/incubator-seata/pull/8170
- [x] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines. - [ ] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes). ### I. Describe what this PR did Use UTF-8 explicitly when `ConfigTools` converts plaintext to bytes for public-key and private-key encryption. Extend the round-trip test with Unicode content. ### II. Does this pull request fix one issue? fixes #8168 ### III. Why don't you add test cases (unit test/integration test)? A regression test is included. Before the fix, it fails on a Windows/GBK environment because the Unicode text `中文` is decrypted as `????`. ### IV. Describe how to verify it `mvn -pl common -am test -Dlicense.skip=true -B` Result: 689 tests run, 0 failures, 0 errors, 4 skipped. Compatibility checks: - JDK 17: complete `common` suite passed. - JDK 8: the Unicode regression test passed. - JDK 8 complete-suite baseline currently has two unrelated failures in `HttpClientUtilTest`: it expects `ConnectException`, while this Windows environment returns `SocketTimeoutException` for `localhost:9999`. ### V. Special notes for reviews Decryption already decodes plaintext bytes with UTF-8. This change makes both encryption paths use the same deterministic charset and removes platform-dependent behavior. ASCII input is unchanged. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
