#1394 s2s logs binary crap

Reporter Reinhard Max
Owner Nobody
Created
Updated
Stars ★★ (2)
Tags
  • Priority-Medium
  • Type-Defect
  • Status-Duplicate
  • Milestone-0.12
  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

  2. Zash on

    Thanks for the report. This is a duplicate of #734 which was fixed in https://hg.prosody.im/trunk/rev/7fa273f8869e

    Changes
    • tags Milestone-0.12 Status-Duplicate

New comment

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