diff options
author | Matt Schatz <genius3000@g3k.solutions> | 2020-07-20 20:37:20 -0600 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-07-27 09:38:11 +0100 |
commit | 30648e84ce9c2515994b95b9d1e2e870283ed214 (patch) | |
tree | 19012b55331f7725d1bca1c683fab1bae245e139 /src/inspsocket.cpp | |
parent | c2218abac11a2ddaff197f93721818efdcc9ae01 (diff) |
Fix secure websocket users not being seen as secure.
Since a TLS (SSL) module will always be the last IOHook attached
to a socket, IsSSL() needs to ignore any Middle IOHooks that may
also be attached.
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 6cf3e3008..6172aebe2 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -510,6 +510,18 @@ IOHook* StreamSocket::GetModHook(Module* mod) const return NULL; } +IOHook* StreamSocket::GetLastHook() const +{ + IOHook* curr = GetIOHook(); + IOHook* last = curr; + + for (; curr; curr = GetNextHook(curr)) + last = curr; + + return last; +} + + void StreamSocket::AddIOHook(IOHook* newhook) { IOHook* curr = GetIOHook(); |