From c64d296edbde5a04b20b7841afd711ea81e171b0 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 20 Mar 2017 10:35:20 +0100 Subject: [PATCH] Make sure to use pretty-printed checksums in JSON blobs; remove semicolons refs #4991 --- lib/redis/rediswriter-utility.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/redis/rediswriter-utility.cpp b/lib/redis/rediswriter-utility.cpp index 8a6b918a0..3e38ec1dc 100644 --- a/lib/redis/rediswriter-utility.cpp +++ b/lib/redis/rediswriter-utility.cpp @@ -38,25 +38,20 @@ String RedisWriter::FormatCheckSumBinary(const String& str) String RedisWriter::CalculateCheckSumString(const String& str) { - return SHA1(str, true); + return SHA1(str); } String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups) { String output; - bool first = true; + ObjectLock olock(groups); for (const String& group : groups) { - if (first) - first = false; - else - output += ";"; - output += SHA1(group, true); //binary checksum required here } - return SHA1(output, false); + return SHA1(output); } String RedisWriter::CalculateCheckSumAttrs(const Dictionary::Ptr& attrs)