You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-19 23:16:19 +00:00
fix(items): guard oversized manifest NPE in FurnidataReader + document JSON5 trailing-comma limit
This commit is contained in:
@@ -55,6 +55,17 @@ class FurnidataReaderTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void oversizedManifestIsSkippedNeverThrows(@TempDir Path dir) throws Exception {
|
||||
Path base = dir.resolve("furnidata");
|
||||
Path core = base.resolve("core");
|
||||
Files.createDirectories(core);
|
||||
// A root manifest larger than the cap we pass in.
|
||||
Files.writeString(base.resolve("manifest.json"), "{ \"tiers\": [ \"core\" ] } // padding ".repeat(50));
|
||||
List<FurnidataEntry> entries = new FurnidataReader(base, 8 /* bytes */).read();
|
||||
assertTrue(entries.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
void splitDirRejectsTraversalFiles(@TempDir Path dir) throws Exception {
|
||||
Path secret = dir.resolve("secret.json");
|
||||
|
||||
Reference in New Issue
Block a user