[Libreoffice-commits] online.git: wsd/FileServer.cpp
Andras Timar
andras.timar at collabora.com
Thu May 24 19:35:56 UTC 2018
wsd/FileServer.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 14bda5897e9007091263dfd8c02712a4d598ecbc
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu May 24 13:33:45 2018 +0200
more tweaks to supported/unsupported branding
Change-Id: I6df2047ace23a2613bb1a314284c8aa2cc2a5c8d
Reviewed-on: https://gerrit.libreoffice.org/54759
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 669f57c4b..3f7080ecd 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -564,7 +564,7 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ
constexpr char BRANDING[] = "branding";
#if ENABLE_SUPPORT_KEY
-constexpr char BRANDING_SUPPORTED[] = "branding-supported";
+constexpr char BRANDING_UNSUPPORTED[] = "branding-unsupported";
#endif
void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::MemoryInputStream& message, const std::shared_ptr<StreamSocket>& socket)
@@ -627,10 +627,10 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::
#if ENABLE_SUPPORT_KEY
const std::string keyString = config.getString("support_key", "");
SupportKey key(keyString);
- if (key.verify() && key.validDaysRemaining() > 0)
+ if (!key.verify() || key.validDaysRemaining() <= 0)
{
- brandCSS = Poco::format(linkCSS, std::string(BRANDING_SUPPORTED));
- brandJS = Poco::format(scriptJS, std::string(BRANDING_SUPPORTED));
+ brandCSS = Poco::format(linkCSS, std::string(BRANDING_UNSUPPORTED));
+ brandJS = Poco::format(scriptJS, std::string(BRANDING_UNSUPPORTED));
}
#elif ENABLE_DEBUG
brandCSS = "";
@@ -807,9 +807,9 @@ void FileServerRequestHandler::preprocessAdminFile(const HTTPRequest& request,co
const std::string keyString = config.getString("support_key", "");
SupportKey key(keyString);
- if (key.verify() && key.validDaysRemaining() > 0)
+ if (!key.verify() || key.validDaysRemaining() <= 0)
{
- brandJS = Poco::format(scriptJS, std::string(BRANDING_SUPPORTED));
+ brandJS = Poco::format(scriptJS, std::string(BRANDING_UNSUPPORTED));
brandFooter = Poco::format(footerPage, key.data(), Poco::DateTimeFormatter::format(key.expiry(), Poco::DateTimeFormat::RFC822_FORMAT));
}
#elif ENABLE_DEBUG
More information about the Libreoffice-commits
mailing list