From c9e36b321f85fc0f6093ec1baceb9c1f16942c21 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 2 Sep 2025 20:41:48 +1200 Subject: [PATCH] Update source/src/templates.cpp --- source/src/templates.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/src/templates.cpp b/source/src/templates.cpp index e0f5769..841dab2 100644 --- a/source/src/templates.cpp +++ b/source/src/templates.cpp @@ -256,14 +256,14 @@ if (metadata.contains("version")) { registry_version = metadata["version"].get(); } - // REQUIRED: templateXXHash64 - the XXHash64 of extracted contents - if (metadata.contains("templateXXHash64")) { - registry_hash = metadata["templateXXHash64"].get(); - debug << "Found templateXXHash64 in metadata: " << registry_hash << std::endl; + // REQUIRED: unpackedhash - the hash of extracted contents + if (metadata.contains("unpackedhash")) { + registry_hash = metadata["unpackedhash"].get(); + debug << "Found unpackedhash in metadata: " << registry_hash << std::endl; } else { - // templateXXHash64 is required for security + // unpackedhash is required for security error << "Template '" << template_name << "' from registry '" << mRegistry.name - << "' does not provide templateXXHash64 for integrity verification." << std::endl; + << "' does not provide unpackedhash for integrity verification." << std::endl; error << "This template cannot be downloaded for security reasons." << std::endl; error << "Please contact the registry administrator to update the template metadata." << std::endl; return template_info(); @@ -329,10 +329,10 @@ std::string actual_hash = hash_directory_recursive(template_cache_dir.string()); // Verify the extracted template hash matches what registry claimed - // templateXXHash64 is required, so registry_hash should always be set here + // unpackedhash is required, so registry_hash should always be set here if (registry_hash.empty()) { // This shouldn't happen as we check for it above, but handle it just in case - error << "Internal error: templateXXHash64 was not properly set" << std::endl; + error << "Internal error: unpackedhash was not properly set" << std::endl; std::filesystem::remove_all(template_cache_dir); return template_info(); }