[Libreoffice-commits] online.git: tools/Config.cpp
Pranav Kant
pranavk at collabora.co.uk
Wed Aug 30 11:55:31 UTC 2017
tools/Config.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 08efd75e3154bb8c00aeffe20311a0e0c5557bc7
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Aug 30 17:19:50 2017 +0530
wsd: fix incorrect password hash format written to config file
Regression from 9a75040bf02e215135ca3f5366c171561eee69ea
Change-Id: I82cd3db17a18702a046973cfe863fdda750b363b
diff --git a/tools/Config.cpp b/tools/Config.cpp
index 72808920..40bbddd1 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -11,6 +11,7 @@
#include <iostream>
#include <iomanip>
+#include <sstream>
#include <termios.h>
#include <openssl/rand.h>
@@ -207,7 +208,7 @@ int Config::main(const std::vector<std::string>& args)
stream << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(pwdhash[j]);
const std::string passwordHash = stream.str();
- std::stringstream pwdConfigValue("pbkdf2.sha512.");
+ std::stringstream pwdConfigValue("pbkdf2.sha512.", std::ios_base::in | std::ios_base::out | std::ios_base::ate);
pwdConfigValue << std::to_string(_adminConfig.pwdIterations) << ".";
pwdConfigValue << saltHash << "." << passwordHash;
_loolConfig.setString("admin_console.secure_password[@desc]",
More information about the Libreoffice-commits
mailing list