mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
feat(02-11): secure guardian notification delivery
- Remove record-mutating affordances from Guardian channel payloads\n- Reject managed Telegram callbacks and verify channel attribution
This commit is contained in:
1 parent
accb98e223
commit
60b4845fea
8 files changed
+276
-41
No files matched your search
@@ -6,23 +6,15 @@ describe("managed Guardian notification payload safety", () => {
|
||||
it("recognises only cross-account record delivery as managed Guardian delivery", () => {
|
||||
expect(
|
||||
isManagedGuardianDelivery({
|
||||
eventType: "MEDICATION_REMINDER",
|
||||
userId: "record-1",
|
||||
recordUserId: "record-1",
|
||||
recipientUserId: "guardian-1",
|
||||
title: "t",
|
||||
message: "m",
|
||||
}),
|
||||
).toBe(true);
|
||||
|
||||
expect(
|
||||
isManagedGuardianDelivery({
|
||||
eventType: "MEDICATION_REMINDER",
|
||||
userId: "user-1",
|
||||
recordUserId: "user-1",
|
||||
recipientUserId: "user-1",
|
||||
title: "t",
|
||||
message: "m",
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user