Claus Ibsen created CAMEL-27255:
-----------------------------------
Summary: camel-mllp - the initial read of a connection logs the
data it received although logPhi is false
Key: CAMEL-27255
URL: https://issues.apache.org/jira/browse/CAMEL-27255
Project: Camel
Issue Type: Bug
Components: camel-mllp
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Fix For: 4.24.0, 4.22.3, 4.18.6
When a client connection is accepted, {{TcpServerConsumerValidationRunnable}}
does an initial read to check for MLLP data. If that read ends without a
complete envelope, it logs the bytes it received:
* data without a START_OF_BLOCK (INFO)
* a socket error after a partial read (WARN)
* a timeout after a partial read (WARN)
These three log statements use
{{MllpSocketBuffer.toPrintFriendlyStringAndReset()}}, so they show the data
even when {{logPhi=false}}, the default since CAMEL-24454. The other paths of
the component use {{toLoggableStringAndReset()}}, which shows the data only
with {{logPhi=true}}.
Fix: use {{toLoggableStringAndReset()}} in these three places too.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)