You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "pyshiweijia (via GitHub)" <gi...@apache.org> on 2026/07/17 08:27:06 UTC

[PR] bugfix: use UTF-8 for ConfigTools encryption [incubator-seata]

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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] bugfix: use UTF-8 for ConfigTools encryption [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes merged PR #8170:
URL: https://github.com/apache/incubator-seata/pull/8170


-- 
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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] bugfix: use UTF-8 for ConfigTools encryption [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8170:
URL: https://github.com/apache/incubator-seata/pull/8170#issuecomment-5065657631

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/8170?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 73.01%. Comparing base ([`e6d0860`](https://app.codecov.io/gh/apache/incubator-seata/commit/e6d0860a4345b10cb59c65c78215ec51d67f59d1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`409a854`](https://app.codecov.io/gh/apache/incubator-seata/commit/409a854c793e2976d90b70adc862f045679e8f6a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on 2.x.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##                2.x    #8170      +/-   ##
   ============================================
   + Coverage     72.88%   73.01%   +0.13%     
     Complexity     1141     1141              
   ============================================
     Files          1151     1151              
     Lines         42272    42272              
     Branches       5045     5045              
   ============================================
   + Hits          30810    30865      +55     
   + Misses         8996     8925      -71     
   - Partials       2466     2482      +16     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/8170?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...java/org/apache/seata/common/util/ConfigTools.java](https://app.codecov.io/gh/apache/incubator-seata/pull/8170?src=pr&el=tree&filepath=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fcommon%2Futil%2FConfigTools.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9jb21tb24vdXRpbC9Db25maWdUb29scy5qYXZh) | `100.00% <100.00%> (ø)` | |
   
   ... and [11 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/8170/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/8170/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/8170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org