You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@plugin.command('nullme')@plugin.require_admin("Sorry, I can't let you do that.", reply=True)@plugin.output_prefix('[NULL] ')defnull(bot, trigger):
"""Send a message containing null, for testing."""bot.say("Null\x00byte!")
At least on Rizon, the bot is not disconnected; the message gets truncated:
<dgw> .nullme
<SopelGitpod> [NULL] Null
Obviously not ideal, but not as bad as it could be.
dgw
linked a pull request
Sep 14, 2024
that will
close
this issue
Requested Feature
irc.utils.safe()
strips CR and LF from its input, but not NUL (\x00
) even though all three octets are disallowed in IRC lines.sopel/sopel/irc/utils.py
Lines 20 to 48 in 3ff58c1
Problems Solved
Plugins accidentally sending NUL will most likely cause the server to disconnect the bot with an error ("malformed data" or similar).
Alternatives
Plugin authors must manually ensure that anything their code sends to IRC does not contain the NUL byte.
Notes
No response
The text was updated successfully, but these errors were encountered: