MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / assertTrustedIpcEvent

Function assertTrustedIpcEvent

apps/desktop/src/main/index.ts:762–766  ·  view source on GitHub ↗
(event: IpcMainEvent | IpcMainInvokeEvent)

Source from the content-addressed store, hash-verified

760}
761
762function assertTrustedIpcEvent(event: IpcMainEvent | IpcMainInvokeEvent): void {
763 if (!isTrustedIpcSender(event.sender)) {
764 throw new Error('Blocked IPC call from an untrusted renderer.')
765 }
766}
767
768function clamp(value: number, min: number, max: number): number {
769 return Math.min(Math.max(value, min), max)

Callers 3

handleFunction · 0.85
onFunction · 0.85
registerIpcFunction · 0.85

Calls 1

isTrustedIpcSenderFunction · 0.85

Tested by

no test coverage detected