unbridled-41 opened a new pull request, #6007: URL: https://github.com/apache/rocketmq-dashboard/pull/6007
### Which Issue(s) This PR Fixes Fixes #6006 ### Problem / Evidence ```java // CloudCredentialService.create (before): only StringUtils.hasText checks credentialRepository.save(credential); // secret_key stores CredentialUtils.encodeBase64(...) ``` ``` CloudCredentialServiceTest: createShouldRejectFieldsThatExceedTheirColumnsTest Expecting code to raise a throwable ``` ### Root cause / Fix The writer ignored that it stores the base64 form of the value it validates, and no field had a width check. Bound name/accessKey to their columns (code points) and the secret by `encodeBase64(secret).length()` - a plaintext bound would still overflow for a non-ASCII secret. ### Priority and scoring **PRIORITY 45** - impact 14/40 (an unexplained 500 on a save the operator has to guess about), blast radius 8/20, reproducibility 20/20, maintenance value 3/20. **FIX_CONFIDENCE 85**. ### Tests `cd server && mvn -o -B -ntp test -Dtest='CloudCredentialServiceTest'` -> `Tests run: 19, Failures: 0, Errors: 0`; the new case fails before the bounds and passes after them, asserting no repository interaction; `checkstyle:check` passes. ### Risk Over-long values are rejected with 400 before any write; nothing that could be stored is refused. -- 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]
