fix(artifacts): read Maven and Gradle metadata with a UTF-8 BOM (#12009)

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
This commit is contained in:
ShuaixinHuangandShuaixinHuang authored and GitHub committed 2026-11-18 10:04:54 -05:00
1 parent 2f6773cbc7
commit 2aaf76c5c1
2 files changed
+32 -2

No files matched your search

+1 -2
View File
@@ -643,8 +643,7 @@ export const parseMavenGradleMetadata = (
);
let source: string;
try {
// ignoreBOM: true kept a leading U+FEFF; "preserve" is that same policy.
source = decodeStrictUtf8(bytes, "preserve");
source = decodeStrictUtf8(bytes, "strip-signature");
} catch {
throw malformedInput(
MAVEN_GRADLE_METADATA_FORMAT,