You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Holm (Jira)" <ji...@apache.org> on 2024/10/14 14:30:00 UTC

[jira] [Created] (CXF-9067) MaskSensitiveHelper incorrectly masks wrapper element

Daniel Holm created CXF-9067:
--------------------------------

             Summary: MaskSensitiveHelper incorrectly masks wrapper element
                 Key: CXF-9067
                 URL: https://issues.apache.org/jira/browse/CXF-9067
             Project: CXF
          Issue Type: Bug
          Components: logging
    Affects Versions: 4.0.5
            Reporter: Daniel Holm


The regex in MaskSensitiveHelper matching possible xml attributes is too relaxed, and will match wrappers starting with the same characters as the sensitive element.

 

This f.ex does not correctly mask the password element:
{code:java}
maskSensitiveHelper.addSensitiveElementNames(Set.of("password")) {code}
raw data:

 
{code:java}
<passwords><password>my secret password</password></passwords> {code}
expected:

 

 
{code:java}
<passwords><password>XXX</password></passwords>{code}
 

actual:

 
{code:java}
<passwords>XXX</password></passwords>{code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)