Browse Source

Tighten length limit for channel names according to RFC 1459

master
JustAnotherArchivist 4 years ago
parent
commit
46d48a480c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      http2irc.py

+ 1
- 1
http2irc.py View File

@@ -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_:


Loading…
Cancel
Save