mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 22:45:47 +00:00
fix(reference): refuse undecodable Git directory pointers (#12209)
This commit is contained in:
1 parent
845e72ea5a
commit
1a89383a79
2 files changed
+50
-1
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { decodeStrictUtf8 } from "../domain/strictUtf8.js";
|
||||
import { isAborted } from "../domain/analysisErrorCore.js";
|
||||
import fs from "node:fs";
|
||||
import { join } from "node:path";
|
||||
@@ -142,7 +143,7 @@ const resolveSourceVcs = async (
|
||||
}
|
||||
};
|
||||
const readMetadataText = async (path: string): Promise<string> =>
|
||||
(await readMetadataBytes(path)).toString("utf8");
|
||||
decodeStrictUtf8(await readMetadataBytes(path), "preserve");
|
||||
const throwCleanupFailures = (primary: unknown): never => {
|
||||
const observations = cleanupFailures.flatMap((failure) =>
|
||||
failure.cleanup === undefined ? [] : [failure.cleanup],
|
||||
|
||||
Reference in new issue
Block a user