mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-23 23:10:17 +05:30
fix(plugins): whitelist plugin export-format IPC channels in preload.js
Task 17's three new IPC channels (plugin-export-formats-registered, run-plugin-export-format, plugin-export-format-result) were missing from preload.js's ALLOWED_SEND_CHANNELS/ALLOWED_RECEIVE_CHANNELS, breaking the established convention that the allowlist is the authoritative registry of every valid channel regardless of whether it's accessed via window.electronAPI or raw ipcRenderer (see toggle-sidebar-panel, set-current-file, save-recent-files). Amit Haridas
This commit is contained in:
@@ -36,6 +36,10 @@ const ALLOWED_SEND_CHANNELS = [
|
||||
'export-with-options',
|
||||
'export-spreadsheet',
|
||||
|
||||
// Plugin export formats
|
||||
'plugin-export-formats-registered',
|
||||
'plugin-export-format-result',
|
||||
|
||||
// Batch conversion
|
||||
'batch-convert',
|
||||
'select-folder',
|
||||
@@ -244,6 +248,9 @@ const ALLOWED_RECEIVE_CHANNELS = [
|
||||
'toggle-command-palette',
|
||||
'toggle-sidebar-panel',
|
||||
'toggle-bottom-panel',
|
||||
|
||||
// Plugin export formats
|
||||
'run-plugin-export-format',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user