mirror of
https://github.com/jlu5/PyLink.git
synced 2025-05-05 22:27:24 +02:00
relay: sanitize idents on hybrid further
This commit is contained in:
parent
d94593e4f6
commit
075c1d141d
@ -407,9 +407,11 @@ def spawn_relay_user(irc, remoteirc, user, times_tagged=0, reuse_sid=None):
|
|||||||
# Truncate idents at 10 characters, because TS6 won't like them otherwise!
|
# Truncate idents at 10 characters, because TS6 won't like them otherwise!
|
||||||
ident = ident[:10]
|
ident = ident[:10]
|
||||||
|
|
||||||
# HACK: hybrid will reject idents that start with a "-". why???
|
# HACK: hybrid will reject idents that start with a symbol
|
||||||
if remoteirc.protoname == 'hybrid' and ident.startswith('-'):
|
if remoteirc.protoname == 'hybrid':
|
||||||
ident = 'r' + ident
|
goodchars = tuple(string.ascii_letters + string.digits + '~')
|
||||||
|
if not ident.startswith(goodchars):
|
||||||
|
ident = 'r' + ident
|
||||||
|
|
||||||
# Normalize hostnames
|
# Normalize hostnames
|
||||||
host = normalize_host(remoteirc, userobj.host)
|
host = normalize_host(remoteirc, userobj.host)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user