[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp
Tor Lillqvist
tml at collabora.com
Mon Apr 11 14:23:16 UTC 2016
loolwsd/IoUtil.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 0f3fa0e9d443efe95418510cba9d40c068964731
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Apr 11 17:16:34 2016 +0300
Don't log the payload inside a CLOSE frame
It is a status code, a 2-byte unsigned integer in network byte order,
potentially followed by a textual reason. But we never include any
specific status codes in the CLOSE frames anyway. (With a Poco-based
WebSocket peer it is always WS_NORMAL_CLOSE, 1000, 0x03 0xE8.)
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 4dacbb4..0b9caaa 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -163,7 +163,8 @@ void SocketProcessor(std::shared_ptr<WebSocket> ws,
<< ", n: " << n
<< ", payload size: " << payload.size()
<< ", flags: " << std::hex << flags << Log::end;
- if (payload.size() > 1)
+
+ if ((flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE && payload.size() > 1)
{
std::string msg;
Poco::URI::encode(std::string(payload.data(), payload.size()), "", msg);
More information about the Libreoffice-commits
mailing list