diff options
author | Peter Powell <petpow@saberuk.com> | 2017-10-12 15:55:21 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-10-12 15:55:21 +0100 |
commit | a3e0768758ca68429a29d9c78ce672f2d938c6e7 (patch) | |
tree | a66b4c4f917d56e1cef8ffda450d535ea532be35 /src/modules/m_cgiirc.cpp | |
parent | c46f8a368c42f64284244f3d2dfc022a383294fa (diff) | |
parent | 0337b92c158fa662f04056343affd59315da78db (diff) |
Merge the latest changes from insp20 into master.
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
-rw-r--r-- | src/modules/m_cgiirc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 305801b0a..d8dbe6da7 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -107,7 +107,7 @@ class CommandWebIRC : public SplitCommand realip.set(user, user->GetIPString()); // Check if we're happy with the provided hostname. If it's problematic then make sure we won't set a host later, just the IP - bool host_ok = (parameters[2].length() <= ServerInstance->Config->Limits.MaxHost); + bool host_ok = (parameters[2].length() <= ServerInstance->Config->Limits.MaxHost) && (parameters[2].find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-") == std::string::npos); const std::string& newhost = (host_ok ? parameters[2] : parameters[3]); if (notify) |