You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/08/15 15:24:45 UTC

[I] [Studio] Credential masking can split supplementary Unicode characters [rocketmq-dashboard]

yyqdbngt opened a new issue, #2252:
URL: https://github.com/apache/rocketmq-dashboard/issues/2252

   ## Problem
   
   `CredentialUtils.mask` measures and slices credentials by UTF-16 code units. If a supplementary Unicode character falls across the four-character visibility boundary, the method can split its surrogate pair and return malformed Unicode. The current length threshold is also based on code units rather than user-visible code points.
   
   ## Expected behavior
   
   Credential masking should preserve the existing ASCII behavior while:
   
   - measuring the partial-mask threshold in Unicode code points;
   - keeping the first and last four complete code points;
   - never returning an isolated surrogate;
   - failing closed for malformed UTF-16 input.
   
   ## Proposed scope
   
   Update the shared credential masking utility and add focused boundary, supplementary-character, short-value, null/empty, and malformed-input tests.
   
   I searched the repository's issues and pull requests for credential masking, Unicode, and surrogate handling and found no existing report or open implementation for this behavior.
   


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

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


Re: [I] [Studio] Credential masking can split supplementary Unicode characters [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #2252:
URL: https://github.com/apache/rocketmq-dashboard/issues/2252#issuecomment-5303067585

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   **Branch:** `rocketmq-studio`
   
   The surrogate-pair splitting in `CredentialUtils.mask()` has been verified. The method uses `value.substring(0, VISIBLE_CREDENTIAL_CHARS)` and `value.substring(value.length() - VISIBLE_CREDENTIAL_CHARS)`, which operate on `char` indices. If a supplementary Unicode character (e.g., emoji or CJK Extension-B) falls at the boundary, the substring splits the surrogate pair, producing malformed UTF-16 output.
   
   **Root Cause:** `String.substring()` works on `char` units, not code points. A supplementary character occupies 2 `char`s (a surrogate pair), and splitting between them creates invalid lone surrogates.
   
   **Impact:** Credential values containing supplementary Unicode characters are displayed with corrupted masking, which may cause display issues or downstream encoding errors.
   
   **Severity:** Low — affects only credentials containing supplementary Unicode characters (rare but valid).
   
   **Verified at:** `server/src/main/java/org/apache/rocketmq/studio/common/util/CredentialUtils.java:mask()`
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


Re: [I] [Studio] Credential masking can split supplementary Unicode characters [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2252:
URL: https://github.com/apache/rocketmq-dashboard/issues/2252#issuecomment-5383287558

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


Re: [I] [Studio] Credential masking can split supplementary Unicode characters [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2252: [Studio] Credential masking can split supplementary Unicode characters
URL: https://github.com/apache/rocketmq-dashboard/issues/2252


-- 
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: commits-unsubscribe@rocketmq.apache.org

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