new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · API · all subjects

ipc: renderer process

2 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Security warning for ipcRenderer.on() exposure

Exposing ipcRenderer.on directly through contextBridge.exposeInMainWorld is dangerous because it gives renderer processes direct access to the entire IPC event system, allowing them to listen for any IPC events, not just the ones intended for them. Even passing callbacks directly is unsafe because the first argument to IPC event callbacks is an IpcRendererEvent object which includes properties like sender that provide access to the underlying ipcRenderer instance, giving the renderer access to this event object and thus the entire IPC system.

Safe exposure pattern for IPC callbacks via contextBridge

When exposing IPC functionality through contextBridge, extract only the necessary values from the event object before passing to the callback. For example, use a handler like (callback) => ipcRenderer.on('update-counter', (_event, value) => callback(value)) to pass only the value to untrusted code, not the event object itself.

Give your agent this brain