Add support of hashes
This commit is contained in:
@@ -41,6 +41,21 @@ namespace PacksManager {
|
||||
|
||||
const string FileContent = File.ReadToEnd();
|
||||
|
||||
const string InfoFileHash = Crypto::Sha256(FileContent);
|
||||
|
||||
if (C_InterfacesPacksHashes.Find(InfoFileHash) < 0) {
|
||||
print('Invalid Pack Config "'+ Id +'": Invalid hash');
|
||||
trace('info.json hash: '+ InfoFileHash);
|
||||
if (S_DisplayHashWarning) {
|
||||
RenderManager::NotifyWarning('Invalid Pack Config "'+ Id +'": Invalid hash');
|
||||
}
|
||||
|
||||
if (!Meta::IsDeveloperMode()) {
|
||||
trace('Invalid Pack Config "'+ Id +'": Invalid hash');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const PackConfig Config(Path, FileContent);
|
||||
G_Configs[Id] = Config;
|
||||
|
Reference in New Issue
Block a user