Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8882]Change the compare method for acl signature to improve the security. #8883

Conversation

dingshuangxi888
Copy link
Contributor

Which Issue(s) This PR Fixes

Change the compare method for acl signature to improve the security.

Fixes #8882

Brief Description

Use the MessageDigest.isEqual method instead of the StringUtils.equals method.

How Did You Test This Change?

@RongtongJin RongtongJin closed this Nov 1, 2024
@RongtongJin RongtongJin reopened this Nov 6, 2024
fuyou001
fuyou001 previously approved these changes Nov 6, 2024
caigy
caigy previously approved these changes Nov 7, 2024
@caigy
Copy link
Contributor

caigy commented Nov 7, 2024

Spotbugs check failed, pls fix it

[INFO] Total bugs: 1
Error: High: Found reliance on default encoding in org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainAccessResource): String.getBytes() [org.apache.rocketmq.acl.plain.PlainPermissionManager] At PlainPermissionManager.java:[line 623] DM_DEFAULT_ENCODING

@dingshuangxi888 dingshuangxi888 dismissed stale reviews from caigy and fuyou001 via 7a17cd1 November 7, 2024 02:43
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 47.51%. Comparing base (5600684) to head (7a17cd1).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...che/rocketmq/acl/plain/PlainPermissionManager.java 50.00% 0 Missing and 1 partial ⚠️
...entication/chain/DefaultAuthenticationHandler.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8883      +/-   ##
=============================================
- Coverage      47.71%   47.51%   -0.20%     
+ Complexity     11763    11730      -33     
=============================================
  Files           1304     1304              
  Lines          91051    91054       +3     
  Branches       11675    11677       +2     
=============================================
- Hits           43448    43268     -180     
- Misses         42274    42436     +162     
- Partials        5329     5350      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RongtongJin RongtongJin merged commit 8514734 into apache:develop Nov 7, 2024
11 checks passed
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.

[Enhancement] Change the compare method for acl signature to improve the security.
5 participants