From 1cc4cf341c6c8c1288fb25678bd36678d6a205a5 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 26 Mar 2018 05:52:35 -0600 Subject: Set User::host before calling ChangeIP() ChangeIP() calls SetClientIP() which revalidates whether the user matches an ELine. However, because the hostname has not changed yet the user may incorrectly be marked as non-exempt. --- src/modules/m_cgiirc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 6c94449b1..482c6447c 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -201,8 +201,8 @@ class ModuleCgiIRC : public Module { cmd.realhost.set(user, user->host); cmd.realip.set(user, user->GetIPString()); - ChangeIP(user, newip); user->host = user->dhost = user->GetIPString(); + ChangeIP(user, newip); user->InvalidateCache(); RecheckClass(user); // Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled @@ -296,10 +296,10 @@ public: if (!webirc_ip) return MOD_RES_PASSTHRU; - ChangeIP(user, *webirc_ip); - std::string* webirc_hostname = cmd.webirc_hostname.get(user); user->host = user->dhost = (webirc_hostname ? *webirc_hostname : user->GetIPString()); + + ChangeIP(user, *webirc_ip); user->InvalidateCache(); RecheckClass(user); -- cgit v1.2.3