https://issues.apache.org/bugzilla/show_bug.cgi?id=49354

Mat Gessel <mat.ges...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mat.ges...@gmail.com

--- Comment #4 from Mat Gessel <mat.ges...@gmail.com> ---
I have run into this a few times logging errors that occur authenticating via
JNDI against an ActiveDirectory server. Either JNDI or AD returns an error
message that is terminated with a NUL (0x00) character. The NUL char is illegal
in a CDATA section (or anywhere in an XML document for that matter). 

I have represented the NUL char as <<NUL>> below. 

<log4j:event logger="com.co.authn.LDAPAuthenticator" timestamp="1349723665747"
level="INFO" thread="http-8443-57">
<log4j:message>
<![CDATA[authenticate(user: bob, domain: foo.com): failed with
javax.naming.AuthenticationException message [LDAP: error code 49 - 80090308:
LdapErr: DSID-0C0903AA, comment: AcceptSecurityContext error, data 525,
v1772<<NUL>>]]]>
</log4j:message>
</log4j:event>

Looks like the place to do the escaping is
org.apache.log4j.helpers.Transform.appendEscapingCDATA().

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to