Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -46,6 +46,14 @@ describe("passwordHasher.server", () => {
expect(result.rehashedHash).toBeUndefined();
});
test("verifyPassword rejects bcrypt credentials that would be silently truncated after 72 bytes", async () => {
const exactPrefix = "x".repeat(72);
const legacyHash = await bcryptjs.hash(exactPrefix, 4);
await expect(verifyPassword(exactPrefix, legacyHash)).resolves.toMatchObject({ valid: true });
await expect(verifyPassword(`${exactPrefix}attacker-controlled-suffix`, legacyHash)).resolves.toEqual({ valid: false });
});
test("verifyPassword rejects unknown / empty hashes without throwing", async () => {
await expect(verifyPassword(PLAINTEXT, "")).resolves.toEqual({ valid: false });
await expect(verifyPassword(PLAINTEXT, "garbage")).resolves.toEqual({ valid: false });