loolwsd/Admin.cpp      |    3 ++-
 loolwsd/FileServer.hpp |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d26246dab0e2171150767ab3a79499e4241ab783
Author: Pranav Kant <pran...@collabora.com>
Date:   Thu Mar 31 00:53:31 2016 +0530

    loolwsd: Temporarily use hard-coded path to key file
    
    We will switch to reading all these values as soon as wip
    configuration file object is accessible globally.
    
    Change-Id: I16eff339349683050be1985eefabc34854cccba3

diff --git a/loolwsd/Admin.cpp b/loolwsd/Admin.cpp
index 1bbfc22..2ad3d3d 100644
--- a/loolwsd/Admin.cpp
+++ b/loolwsd/Admin.cpp
@@ -356,7 +356,8 @@ void AdminRequestHandler::handleRequest(HTTPServerRequest& 
request, HTTPServerRe
 
                 const std::string jwtToken = request["Cookie"].substr(pos + 1);
                 Log::info("Verifying JWT token: " + jwtToken);
-                const std::string keyPath = 
Poco::Path(Application::instance().commandPath()).parent().toString() + 
SSL_KEY_FILE;
+                // TODO: Read key from configuration file
+                const std::string keyPath = "/etc/loolwsd/" + 
std::string(SSL_KEY_FILE);
                 JWTAuth authAgent(keyPath, "admin", "admin", "admin");
                 if (authAgent.verify(jwtToken))
                 {
diff --git a/loolwsd/FileServer.hpp b/loolwsd/FileServer.hpp
index 787fbbd..c1c8dd7 100644
--- a/loolwsd/FileServer.hpp
+++ b/loolwsd/FileServer.hpp
@@ -74,7 +74,8 @@ public:
                     {
                         const std::string htmlMimeType = "text/html";
                         // generate and set the cookie
-                        const std::string keyPath = 
Poco::Path(Application::instance().commandPath()).parent().toString() + 
SSL_KEY_FILE;
+                        // TODO: Read key from configuration file
+                        const std::string keyPath = "/etc/loolwsd/" + 
std::string(SSL_KEY_FILE);
                         JWTAuth authAgent(keyPath, "admin", "admin", "admin");
                         const std::string jwtToken = 
authAgent.getAccessToken();
                         Poco::Net::HTTPCookie cookie("jwt", jwtToken);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to