summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2022-07-29 12:25:05 -0400
committerGökay ŞATIR <gokaysatir@gmail.com>2022-09-29 10:28:18 +0300
commit6487be75e78662c50364b02e2fc06183042b24c9 (patch)
tree2f1d7b5efab9ec4f5d70f4b43caa7fd6d617eb2d
parentbrowser: initial integrator redirection (diff)
downloadonline-6487be75e78662c50364b02e2fc06183042b24c9.tar.gz
online-6487be75e78662c50364b02e2fc06183042b24c9.zip
wsd: add optional parameter buy_product
Change-Id: I9ec71025c2ae3e0d477a8ede49dfdd96398fbbef Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--wsd/FileServer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 1e781281f4..75917363da 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -896,6 +896,8 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
LOG_TRC("ui_defaults=" << uiDefaults);
const std::string cssVars = form.get("css_variables", "");
LOG_TRC("css_variables=" << cssVars);
+ const std::string buyProduct = form.get("buy_product", "");
+ LOG_TRC("buy_product=" << buyProduct);
const std::string postMessageOrigin = form.get("postmessage_origin", "");
LOG_TRC("postmessage_origin" << postMessageOrigin);
const std::string theme = form.get("theme", "");
@@ -1063,7 +1065,8 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request,
// iframe purposes.
std::ostringstream cspOss;
cspOss << "Content-Security-Policy: default-src 'none'; "
- "frame-src 'self' " << WELCOME_URL << " " << FEEDBACK_URL << " blob: " << documentSigningURL << "; "
+ "frame-src 'self' " << WELCOME_URL << " " << FEEDBACK_URL << " " << buyProduct <<
+ " blob: " << documentSigningURL << "; "
"connect-src 'self' " << cnxDetails.getWebSocketUrl() << "; "
"script-src 'unsafe-inline' 'self'; "
"style-src 'self' 'unsafe-inline'; "