wsd/FileServer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 25d4dbd4832254bea112845ff4ba05a246efe4b7 Author: Ashod Nakashian <[email protected]> AuthorDate: Wed Aug 28 21:18:53 2019 -0400 Commit: Andras Timar <[email protected]> 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 <[email protected]> Tested-by: Andras Timar <[email protected]> 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()); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
