[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-4' - wsd/FileServer.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 30 12:52:59 UTC 2019
wsd/FileServer.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 25d4dbd4832254bea112845ff4ba05a246efe4b7
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Aug 28 21:18:53 2019 -0400
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Aug 30 14:52:42 2019 +0200
wsd: sanitize url when error reporting
Change-Id: I7937429f2f987212beaeb9a97b48bfedb0a7ac58
Reviewed-on: https://gerrit.libreoffice.org/78294
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 447a23a90..bda54a83c 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -444,8 +444,10 @@ void FileServerRequestHandler::sendError(int errorCode, const Poco::Net::HTTPReq
<< "\r\n";
if (!shortMessage.empty())
{
+ std::string pathSanitized;
+ Poco::URI::encode(path, "", pathSanitized);
oss << "<h1>Error: " << shortMessage << "</h1>"
- << "<p>" << longMessage << " " << path << "</p>"
+ << "<p>" << longMessage << ' ' << pathSanitized << "</p>"
<< "<p>Please contact your system administrator.</p>";
}
socket->send(oss.str());
More information about the Libreoffice-commits
mailing list