diff --git a/app/core/service/PackageSyncerService.ts b/app/core/service/PackageSyncerService.ts index b2895abd..b2866c45 100644 --- a/app/core/service/PackageSyncerService.ts +++ b/app/core/service/PackageSyncerService.ts @@ -740,6 +740,11 @@ export class PackageSyncerService extends AbstractService { let shouldRefreshDistTags = false; for (const tag in distTags) { const version = distTags[tag]; + const utf8mb3Regex = /[\u0020-\uD7FF\uE000-\uFFFD]/; + if (!utf8mb3Regex.test(tag)) { + logs.push(`[${isoNow()}] 🚧 invalid tag(${tag}: ${version}), tag name is out of utf8mb3, skip`); + continue; + } // 新 tag 指向的版本既不在存量数据里,也不在本次同步版本列表里 // 例如 latest 对应的 version 写入失败跳过 if (!existsVersionMap[version] && !updateVersions.includes(version)) {