ineeee / Taigabot

taiga irc bot
GNU General Public License v3.0
4 stars 7 forks source link

systemd journal hides info when someone sends binary data over a message #45

Closed ineeee closed 1 year ago

ineeee commented 1 year ago

when sending this:

<ine> i must test
<ine> �_�����dSK�Js?7F��y��~�U��q�Q��ڗ���合��u@���n�w����t�Ғ�yߐl�Q��Ǩ��'=\W�+F���L�pjMC�ϐ�����}��&f��DԐ���B��J|����?ri0�m���H�� �u�1��w��I��/������H�=�x��� ��(�r��
�@O;I�U�EG%��y��^6���U�'ԞS��i�d:�$����}ќXQȰG�

this shows up in systemd's journal:

Jul 03 02:50:44 taiga python[1413978]: 02:50:44 #prussian <ine> i must test
Jul 03 02:50:45 taiga python[1413978]: [151B blob data]

i discovered this when i piped /dev/urandom to spam a channel lol

can't tell if its python or systemd (99% sure its a taigabot issue and not systemd)

ineeee commented 1 year ago

its fucking systemd

<ine> kekbot: does python print "B blob data" for binary files?
<ine> .gpt does python print "B blob data" for binary files?
<kekbot> No, Python does not print "b blob data" for binary files. [snip]
<Taigabot> [AI] ine: No, Python does not automatically print "B blob data" for binary files. [snip]
<ine> kekbot: does systemd journalctl show "blob data"?
<ine> .gpt does systemd journalctl show "blob data"?
<kekbot> Yes, systemd journalctl can show "blob data". This is a placeholder for binary data that cannot be displayed as text. If you see "blob data" in your journalctl output, it means that the data in that field is not printable or is too long to be displayed. [snip]
<Taigabot> [AI] ine: Yes, systemd journalctl can show "blob data". The Systemd journal is a binary log file that captures system events and other logging information. It can store structured data as well as binary data known as "blob data". [snip]
ineeee commented 1 year ago

fixed by using --all when reading journalctl:

# journalctl -u taiga --all