wsd/FileServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit ac84b5f56132f47642f368dc347e40be155a6647 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Wed Aug 28 21:18:53 2019 -0400 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Aug 30 15:23:52 2019 +0200 wsd: sanitize url when error reporting Change-Id: I7937429f2f987212beaeb9a97b48bfedb0a7ac58 Reviewed-on: https://gerrit.libreoffice.org/78243 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 33d42766c..25b00c325 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()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits