diff options
author | Peter Powell <petpow@saberuk.com> | 2018-11-26 15:15:18 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-12-01 23:48:33 +0000 |
commit | ec6955f28ba9423828ac24ef83caee09ffa6b52c (patch) | |
tree | 5160c97069498ba1a11732f21398380a7be008f4 /src/modules/m_jumpserver.cpp | |
parent | 95749975408a985d6a6a9ff53bbf3592c90b8649 (diff) |
Fix detecting secure clients connecting through HAProxy/WEBIRC.
Diffstat (limited to 'src/modules/m_jumpserver.cpp')
-rw-r--r-- | src/modules/m_jumpserver.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 682e353d2..fc13a831c 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -38,8 +38,11 @@ class CommandJumpserver : public Command std::string reason; int port; int sslport; + UserCertificateAPI sslapi; - CommandJumpserver(Module* Creator) : Command(Creator, "JUMPSERVER", 0, 4) + CommandJumpserver(Module* Creator) + : Command(Creator, "JUMPSERVER", 0, 4) + , sslapi(Creator) { flags_needed = 'o'; syntax = "[<server> <port>[:<sslport>] <+/-an> <reason>]"; @@ -146,7 +149,7 @@ class CommandJumpserver : public Command int GetPort(LocalUser* user) { - int p = (SSLIOHook::IsSSL(&user->eh) ? sslport : port); + int p = (sslapi && sslapi->GetCertificate(user) ? sslport : port); if (p == 0) p = user->GetServerPort(); return p; |