3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 19:52:53 +01:00

ts6: the @cooper fix

Validate that incoming TS is valid, because bad user timestamps like 0 will cause InspIRCd networks to SQUIT if forwarded over Relay.
This commit is contained in:
James Lu 2016-07-10 20:27:09 -07:00
parent b90d7c3bec
commit 1675c43841

View File

@ -505,6 +505,7 @@ class TS6Protocol(TS6BaseProtocol):
log.debug('(%s) handle_euid got args: nick=%s ts=%s uid=%s ident=%s '
'host=%s realname=%s realhost=%s ip=%s', self.irc.name, nick, ts, uid,
ident, host, realname, realhost, ip)
assert ts != 0, "Bad TS 0 for user %s" % uid
if ip == '0': # IP was invalid; something used for services.
ip = '0.0.0.0'