{"record":{"id":"7886aa605fe6544b","repo":"siyuan-note/siyuan","slug":"checksum-manifest-is-too-large","errorCode":null,"errorMessage":"checksum manifest is too large","messagePattern":"checksum manifest is too large","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/updater_release.go","lineNumber":399,"sourceCode":"\t}\n\n\tresponse, err := httpclient.NewCloudRequest30s().SetContext(ctx).Get(manifestAsset.BrowserDownloadURL)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif nil == response || nil == response.Response {\n\t\treturn \"\", errors.New(\"checksum manifest response is empty\")\n\t}\n\tdefer response.Body.Close()\n\tif 200 != response.StatusCode {\n\t\treturn \"\", fmt.Errorf(\"get checksum manifest failed: %d\", response.StatusCode)\n\t}\n\tdata, err := io.ReadAll(io.LimitReader(response.Body, maxChecksumManifestSize+1))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif maxChecksumManifestSize < int64(len(data)) {\n\t\treturn \"\", errors.New(\"checksum manifest is too large\")\n\t}\n\tif \"\" != manifestDigest {\n\t\tactualDigest := fmt.Sprintf(\"%x\", sha256.Sum256(data))\n\t\tif manifestDigest != actualDigest {\n\t\t\treturn \"\", errors.New(\"checksum manifest digest mismatch\")\n\t\t}\n\t}\n\tmanifest := string(data)\n\tif \"\" != manifestCacheKey {\n\t\tgithubManifestCache.Store(manifestCacheKey, manifest)\n\t}\n\tchecksum := parseChecksumManifest(manifest, pkgName)\n\tif \"\" == checksum {\n\t\treturn \"\", errors.New(\"package checksum is unavailable\")\n\t}\n\treturn checksum, nil\n}\n","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/updater_release.go#L381-L417","documentation":"Returned by getGitHubManifestChecksum when the downloaded manifest body exceeds maxChecksumManifestSize (1 MiB = 1024*1024 bytes). The read uses io.LimitReader(body, max+1) and rejects if len(data) > max. A legitimate SHA256SUMS.txt is a few kilobytes, so this trips only on a malformed, hijacked, or wrong-content response.","triggerScenarios":"The download URL served an HTML error page (large) instead of the text manifest. A proxy returned a large interstitial/captive-portal page. The asset was mis-uploaded as a large binary. MITM serving an oversized payload.","commonSituations":"Captive portal or proxy auth page intercepted the download. GitHub returned an HTML error page with a 200 (rare misconfiguration). Asset misnamed so a different large file was served.","solutions":["Retry from a different network to rule out a captive portal/proxy.","Switch to the stable channel to use cloud JSON checksums instead.","Manually download the manifest URL in a browser to inspect what is actually being served."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Treat oversized manifest as a hard integrity stop; do not parse it.\n_, err := getGitHubManifestChecksum(ctx, release, pkgName)\nif err != nil && strings.Contains(err.Error(), \"too large\") {\n    logging.LogErrorf(\"manifest suspiciously large; possible MITM/proxy: %s\", err)\n    // do NOT retry from same network; switch source\n    return getStablePackageChecksum(rhyResult, pkgName)\n}","preventionTips":["Never raise maxChecksumManifestSize to silence the error — it's a tamper guard.","Investigate the network path (captive portal, proxy) when this fires.","Fall back to an independent checksum source rather than disabling the limit."],"tags":["update","checksum","manifest","size-limit","security","network"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}