You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "strongduanmu (via GitHub)" <gi...@apache.org> on 2023/05/12 10:21:22 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #25616: Wrong mask result return when I config same value of from-x and to-y with KEEP_FROM_X_TO_Y

strongduanmu opened a new issue, #25616:
URL: https://github.com/apache/shardingsphere/issues/25616

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   [0997ec9](https://github.com/apache/shardingsphere/commit/0997ec95c9e699fab8e8289c5d3c111d02463910)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Return correct mask result when I config same value of from-x and to-y with KEEP_FROM_X_TO_Y
   
   ### Actual behavior
   
   ```
   java.lang.AssertionError: 
   Expected: is "**c******"
        but: was "abc123456"
   Expected :**c******
   Actual   :abc123456
   <Click to see difference>
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ```java
   class KeepFromXToYMaskAlgorithmTest {
       
       private KeepFromXToYMaskAlgorithm maskAlgorithm;
       
       @BeforeEach
       void setUp() {
           maskAlgorithm = new KeepFromXToYMaskAlgorithm();
           maskAlgorithm.init(PropertiesBuilder.build(new Property("from-x", "2"), new Property("to-y", "2"), new Property("replace-char", "*")));
       }
       
       @Test
       void assertMask() {
           assertThat(maskAlgorithm.mask("abc123456"), is("**c******"));
       }
   }
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] taojintianxia closed issue #25616: Wrong mask result return when I config same value of from-x and to-y with KEEP_FROM_X_TO_Y

Posted by "taojintianxia (via GitHub)" <gi...@apache.org>.
taojintianxia closed issue #25616: Wrong mask result return when I config same value of from-x and to-y with KEEP_FROM_X_TO_Y
URL: https://github.com/apache/shardingsphere/issues/25616


-- 
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@shardingsphere.apache.org

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