reta commented on code in PR #2105:
URL: https://github.com/apache/cxf/pull/2105#discussion_r1799866770


##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/MaskSensitiveHelper.java:
##########
@@ -32,7 +32,7 @@ public class MaskSensitiveHelper {
             + 
"\\u00F8-\\u02FF\\u0300-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F"
             + "\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]+";
     private static final String MATCH_PATTERN_XML_TEMPLATE = "(<(" + 
PATTERN_XML_NAMESPACE_PREFIX
-            + ":)?-ELEMENT_NAME-.*?>)(.*?)(</(" + PATTERN_XML_NAMESPACE_PREFIX 
+ ":)?-ELEMENT_NAME->)";
+            + ":)?-ELEMENT_NAME-.*?>)([\\s\\S]*?)(</(" + 
PATTERN_XML_NAMESPACE_PREFIX + ":)?-ELEMENT_NAME->)";

Review Comment:
   ```suggestion
               + ":)?-ELEMENT_NAME-.*?>)(.*?)(</(" + 
PATTERN_XML_NAMESPACE_PREFIX + ":)?-ELEMENT_NAME->)";
   ```
   
   So for this one, I think what we really want is to `.` to match all (for XML 
and JSON), this could be done by passing the flags to the `Pattern::compile`:
   
   ```
   Pattern.compile(matchPattern, Pattern.DOTALL);
   ```



-- 
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: dev-unsubscr...@cxf.apache.org

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

Reply via email to