3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

unreal: forcibly SETHOST to the desired vHost in spawnClient

This prevents real host / IP address leaks, since the "virt host" specified in UID doesn't seem to be respected by the IRCd (real host is shown instead). Workaround for #136.
This commit is contained in:
James Lu 2015-11-26 22:34:15 -08:00
parent 0c068c6543
commit 994eaef12c

View File

@ -90,6 +90,12 @@ class UnrealProtocol(TS6BaseProtocol):
nick=nick, ident=ident, uid=uid, nick=nick, ident=ident, uid=uid,
modes=raw_modes, realname=realname, modes=raw_modes, realname=realname,
realhost=realhost, ip=encoded_ip)) realhost=realhost, ip=encoded_ip))
# Force the virtual hostname to show correctly by running SETHOST on
# the user. Otherwise, Unreal will show the real host of the person
# instead, which is probably not what we want.
self.updateClient(uid, 'HOST', host)
return u return u
def joinClient(self, client, channel): def joinClient(self, client, channel):