mirror of https://github.com/Icinga/icinga2.git
Make sure to use pretty-printed checksums in JSON blobs; remove semicolons
refs #4991
This commit is contained in:
parent
2d9be77260
commit
c64d296edb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue