[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - wsd/LOOLWSD.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri May 3 16:05:01 UTC 2019
wsd/LOOLWSD.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 7add1c776f43b81f3a3ac3b941ad5cec85d03d65
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri Mar 1 22:05:11 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri May 3 18:04:42 2019 +0200
Authenticate socket earlier.
Change-Id: Idf3caba6276dd71450b86574ef39a1a16e73f61c
Reviewed-on: https://gerrit.libreoffice.org/71753
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4421afe9e..1cd9841a5 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2344,11 +2344,7 @@ private:
StringTokenizer tokens(request.getURI(), "/?");
if (tokens.count() > 2 && tokens[2] == "convert-to")
{
- ConvertToPartHandler handler(/*convertTo =*/ true);
- HTMLForm form(request, message, handler);
-
- std::string format = (form.has("format") ? form.get("format") : "");
-
+ // Validate sender - FIXME: should do this even earlier.
if (!allowConvertTo(socket->clientAddress(), request, true))
{
LOG_TRC("Conversion not allowed from this address");
@@ -2363,6 +2359,11 @@ private:
return;
}
+ ConvertToPartHandler handler(/*convertTo =*/ true);
+ HTMLForm form(request, message, handler);
+
+ std::string format = (form.has("format") ? form.get("format") : "");
+
// prefer what is in the URI
if (tokens.count() > 3)
format = tokens[3];
More information about the Libreoffice-commits
mailing list