yyqdbngt opened a new pull request, #1976:
URL: https://github.com/apache/rocketmq-dashboard/pull/1976

   ## What is the purpose of the change
   
   `CredentialUtils.decodeBase64` only fell back to the raw value when the 
stored string was *not* valid base64. A legacy plain-text credential that 
happens to be composed entirely of base64-alphabet characters (e.g. `abcd1234`) 
decoded successfully into garbage instead of returning the original value, 
breaking broker/cloud credential verification on such deployments.
   
   ## Brief changelog
   
   - After decoding, re-encode and require an exact round trip; a value that 
was really produced by `encodeBase64` always round-trips exactly, while a 
legacy plain-text value does not and is returned verbatim.
   - Add `CredentialUtilsTest` covering round-trip, legacy plain-text, and 
null/empty handling.
   
   ## Verifying this change
   
   - `mvn -q 
-Dtest=CredentialUtilsTest,CloudCredentialServiceTest,MybatisPlusAclRepositoryTest
 test`
   - `mvn -q test` (1056/1056)
   - `git diff --check`
   


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