aboutsummaryrefslogtreecommitdiff
path: root/http2irc.py
diff options
context:
space:
mode:
authorGravatar JustAnotherArchivist2020-05-12 19:01:02 +0000
committerGravatar JustAnotherArchivist2020-05-12 19:01:02 +0000
commit46d48a480c13085373aa1f5b17e58f416c616e06 (patch)
tree6c4ee05616330511d90c83724d0bd7f96e1e5d5e /http2irc.py
parentCrash loudly if an IRC message is too long despite all the checks and splits (diff)
signature
Tighten length limit for channel names according to RFC 1459
Diffstat (limited to 'http2irc.py')
-rw-r--r--http2irc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/http2irc.py b/http2irc.py
index 9de99df..14822eb 100644
--- a/http2irc.py
+++ b/http2irc.py
@@ -142,7 +142,7 @@ class Config(dict):
raise InvalidConfig(f'Invalid map {key!r} IRC channel: does not start with # or &')
if any(x in map_['ircchannel'][1:] for x in (' ', '\x00', '\x07', '\r', '\n', ',')):
raise InvalidConfig(f'Invalid map {key!r} IRC channel: contains forbidden characters')
- if 14 + len(map_['ircchannel']) > 510: # 14 = prefix 'PRIVMSG ' + suffix ' :' + at least one UTF-8 character; implicitly also covers the shorter JOIN/PART messages
+ if len(map_['ircchannel']) > 200:
raise InvalidConfig(f'Invalid map {key!r} IRC channel: too long')
if 'auth' in map_: