[Libreoffice-commits] online.git: Branch 'libreoffice-6-2' - wsd/ClientSession.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon May 20 09:25:13 UTC 2019
wsd/ClientSession.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit b12c35d3a83e49068bca911e9ac4fd204ce9f205
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri May 17 14:26:07 2019 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon May 20 11:24:55 2019 +0200
Tolerate empty first lines.
Change-Id: Ib9aaf82560fc3f5adaa97f40a3de5f3946c6f65d
(cherry picked from commit 8be093ed671eaf58124ebfc0404d241ee56d64de)
Reviewed-on: https://gerrit.libreoffice.org/72481
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 20819f83c..9797d73bb 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -87,6 +87,12 @@ bool ClientSession::_handleInput(const char *buffer, int length)
return false;
}
+ if (tokens.size() < 1)
+ {
+ sendTextFrame("error: cmd=empty kind=unknown");
+ return false;
+ }
+
LOOLWSD::dumpIncomingTrace(docBroker->getJailId(), getId(), firstLine);
if (LOOLProtocol::tokenIndicatesUserInteraction(tokens[0]))
@@ -97,7 +103,7 @@ bool ClientSession::_handleInput(const char *buffer, int length)
}
if (tokens[0] == "loolclient")
{
- if (tokens.size() < 1)
+ if (tokens.size() < 2)
{
sendTextFrame("error: cmd=loolclient kind=badprotocolversion");
return false;
More information about the Libreoffice-commits
mailing list