diff options
author | Peter Powell <petpow@saberuk.com> | 2018-03-26 05:52:35 -0600 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-06 22:29:42 +0100 |
commit | 1cc4cf341c6c8c1288fb25678bd36678d6a205a5 (patch) | |
tree | 857988c4bf3cd2faa761b3bfd9ab73d1fa64a6ab | |
parent | fdeccd7dd366ebac516ed66841fbf7f0952d8ed2 (diff) |
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.
-rw-r--r-- | src/modules/m_cgiirc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |