reta commented on code in PR #1721:
URL: https://github.com/apache/cxf/pull/1721#discussion_r1518387591
##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/MaskSensitiveHelper.java:
##########
@@ -27,8 +27,8 @@
public class MaskSensitiveHelper {
private static final String ELEMENT_NAME_TEMPLATE = "-ELEMENT_NAME-";
- private static final String MATCH_PATTERN_XML_TEMPLATE =
"(<-ELEMENT_NAME-.*?>)(.*?)(</-ELEMENT_NAME->)";
- private static final String REPLACEMENT_XML_TEMPLATE = "$1XXX$3";
+ private static final String MATCH_PATTERN_XML_TEMPLATE =
"(<(\\w+:)?-ELEMENT_NAME-.*?>)(.*?)(</(\\w+:)?-ELEMENT_NAME->)";
Review Comment:
@gpitteloud thanks for the pull request, I think the characters that could
be included into XML namespace name are wider than Java's `\w` character class.
[1] https://www.w3.org/TR/xml11/#NT-NameChar
--
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]