Fix incorrect hash size for User objects

fixes #12533
This commit is contained in:
Gunnar Beutner 2016-08-25 07:37:41 +02:00
parent e33dffcbba
commit 3b04e04565
2 changed files with 2 additions and 1 deletions

View File

@ -445,6 +445,7 @@ void DbConnection::UpdateObject(const ConfigObject::Ptr& object)
Dictionary::Ptr configFields = dbobj->GetConfigFields();
String configHash = dbobj->CalculateConfigHash(configFields);
ASSERT(configHash.GetLength() <= 64);
configFields->Set("config_hash", configHash);
String cachedHash = GetConfigHash(dbobj);

View File

@ -175,5 +175,5 @@ String UserDbObject::CalculateConfigHash(const Dictionary::Ptr& configFields) co
if (groups)
hashData += DbObject::HashValue(groups);
return hashData;
return SHA256(hashData);
}