aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-10-19 05:05:28 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-10-19 05:05:33 +0200
commit68e95aa175000a3bf8f6b087a6323a2243665656 (patch)
treeae1a2c47a6b7cb90e8f1f659f3e7af2498a8102f /src
parent6a5a2ba11a06f0b5f599ee762139f7abec3a6bfb (diff)
Fix password salt not stored, generating a new salt everytime
Diffstat (limited to 'src')
-rw-r--r--src/DatabaseStorage.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/DatabaseStorage.cpp b/src/DatabaseStorage.cpp
index 14b74e8..de9d0df 100644
--- a/src/DatabaseStorage.cpp
+++ b/src/DatabaseStorage.cpp
@@ -158,6 +158,7 @@ namespace odhtdb
metadataSerializer.add(STORAGE_VERSION);
randombytes_buf(passwordSalt, PASSWORD_SALT_LEN);
metadataSerializer.add(passwordSalt, PASSWORD_SALT_LEN);
+ fileOverwrite(metadataFilePath, { metadataSerializer.getBuffer().data(), metadataSerializer.getBuffer().size() });
}
catch(sibs::DeserializeException &e)
{