summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-06-27 12:13:03 -0400
committerAndras Timar <andras.timar@collabora.com>2022-07-06 14:31:04 +0200
commit216a595061ec8efad3693dbe0be5b6200e04fb2f (patch)
tree7aee3704f5c0bfb6bf880f44cf033b3234f309e5
parentwsd: proxy: ensure to forward only static files (diff)
downloadonline-216a595061ec8efad3693dbe0be5b6200e04fb2f.tar.gz
online-216a595061ec8efad3693dbe0be5b6200e04fb2f.zip
wsd: proxy: fix length static string
Change-Id: I4508fc3e32f4d13a1a8ae88c3e4b9abc6d724ac4 Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--wsd/COOLWSD.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/wsd/COOLWSD.cpp b/wsd/COOLWSD.cpp
index b7721e46a6..ba1fb5333b 100644
--- a/wsd/COOLWSD.cpp
+++ b/wsd/COOLWSD.cpp
@@ -3429,10 +3429,11 @@ private:
{
// File server
assert(socket && "Must have a valid socket");
- constexpr auto ProxyRemote = "/remote/static/";
+ constexpr auto ProxyRemote = "/remote/";
constexpr auto ProxyRemoteLen = sizeof(ProxyRemote) - 1;
+ constexpr auto ProxyRemoteStatic = "/remote/static/";
const auto uri = requestDetails.getURI();
- const auto pos = uri.find(ProxyRemote);
+ const auto pos = uri.find(ProxyRemoteStatic);
if (pos != std::string::npos)
{
ProxyRequestHandler::handleRequest(uri.substr(pos + ProxyRemoteLen), socket);