#1394 s2s logs binary crap

Reporter Reinhard Max
Owner Nobody
Created
Updated
Stars ★★ (2)
Tags
  • Status-New
  • Type-Defect
  • Priority-Medium
  1. Reinhard Max on

    When receiving data that is not well-formed XML, s2s writes the received data to the log file in full length and without filtering out or escaping non-printable characters. This can confuse tools that read the log file and expect it to be What steps will reproduce the problem? 1. echo -e 'Test1\nTest2\tTest3' | netcat $SERVER 5269 2. prosody.log contains: --- snip --- Jul 18 11:43:33 s2sin558c25250b10 warn Received invalid XML: Test1 Test2 Test3 --- snap -- What is the expected output? The non-printable characters (newline and tab) should be escaped or ommitted from the output. These characters are just an example, it happens with all sort of binary data (e.g. when sending data from /dev/urandom over the socket) and can severely corrupt the log file. What version of the product are you using? On what operating system? 0.11.2

New comment

Not published. Used for spam prevention and optional update notifications.