mvanhorn opened a new pull request, #4456: URL: https://github.com/apache/logging-log4j2/pull/4456
**INSERT HERE** a clear and concise description of what the pull request is for along with a reference to the associated issue IDs, if they exist. TLS syslog messages encoded with a non-default charset can advertise a length that differs from the payload's byte count. Receivers can then misidentify where a frame ends. TlsSyslogFrame always counted message bytes in UTF-8, while Rfc5424Layout encoded the frame using its configured charset. Adds a charset-aware TlsSyslogFrame constructor and passes the layout's charset when framing messages. The existing constructor retains UTF-8 behavior. Adds coverage for charset-dependent lengths, empty messages, supplementary characters, and agreement between the advertised length and encoded payload. ./mvnw -B -ntp -pl log4j-core -am test-compile failed at the Java version check before compilation. ./mvnw -B -ntp -pl log4j-core-test -am test -Dtest=TlsSyslogFrameTest,Rfc5424LayoutTest -Dsurefire.failIfNoSpecifiedTests=false failed at the Java version check, so no tests ran. repo_lint was invoked, but the transcript records no output or exit status. The tests in `log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/TlsSyslogFrameTest.java` and `log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/Rfc5424LayoutTest.java` fail without the fix in the logging-log4j2 TlsSyslogFrame change (checked by reverting the source changes). ## Checklist * Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` otherwise * The local test run for the logging-log4j2 TlsSyslogFrame change to `log4j-core/src/main/java/org/apache/logging/log4j/core/appender/TlsSyslogFrame.java`, `log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Rfc5424Layout.java` and `src/changelog/.2.x.x/4455_rfc5424_tls_frame_charset.xml` could not complete in this environment. * Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` directory * Tests are provided Fixes #4455 -- 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]
