mirror of https://github.com/Icinga/icinga2.git
parent
8ed21fcdad
commit
225bb8029a
|
@ -444,6 +444,7 @@ void DbConnection::UpdateObject(const ConfigObject::Ptr& object)
|
||||||
|
|
||||||
Dictionary::Ptr configFields = dbobj->GetConfigFields();
|
Dictionary::Ptr configFields = dbobj->GetConfigFields();
|
||||||
String configHash = dbobj->CalculateConfigHash(configFields);
|
String configHash = dbobj->CalculateConfigHash(configFields);
|
||||||
|
ASSERT(configHash.GetLength() <= 64);
|
||||||
configFields->Set("config_hash", configHash);
|
configFields->Set("config_hash", configHash);
|
||||||
|
|
||||||
String cachedHash = GetConfigHash(dbobj);
|
String cachedHash = GetConfigHash(dbobj);
|
||||||
|
|
|
@ -174,5 +174,5 @@ String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) co
|
||||||
if (groups)
|
if (groups)
|
||||||
hashData += DbObject::HashValue(groups);
|
hashData += DbObject::HashValue(groups);
|
||||||
|
|
||||||
return hashData;
|
return SHA256(hashData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue