From 32ef323129fb0c67586c7cb1d47448d2ba0fe02d Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 22 Apr 2026 17:04:53 +0800 Subject: [PATCH 1/3] :memo: Update Security report Signed-off-by: Daniel <845765@qq.com> --- .github/SECURITY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index fc0a8fcb9..7dd5038c9 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -9,5 +9,6 @@ Some areas we don't consider security vulnerabilities: * Arbitrary file write: Writing files outside the workspace path (e.g., exporting files) is a common user need * Chart/Formula/ABC rendering code injection: This is a common user need, for details please refer to https://github.com/siyuan-note/siyuan/pull/6917 * SQL injection +* Pandoc Argument Injection: Allowing the setting of `--lua-filter` is essential Thank you very much! From 0757663aaef2c4b0e8e2ed39594828a73110d387 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 22 Apr 2026 17:05:21 +0800 Subject: [PATCH 2/3] :memo: Update Security report Signed-off-by: Daniel <845765@qq.com> --- .github/SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 7dd5038c9..1fe063cd4 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -9,6 +9,6 @@ Some areas we don't consider security vulnerabilities: * Arbitrary file write: Writing files outside the workspace path (e.g., exporting files) is a common user need * Chart/Formula/ABC rendering code injection: This is a common user need, for details please refer to https://github.com/siyuan-note/siyuan/pull/6917 * SQL injection -* Pandoc Argument Injection: Allowing the setting of `--lua-filter` is essential +* Pandoc Argument Injection: Allowing the setting of `--lua-filter` is a common user need Thank you very much! From 596a7f750614e047b092400440c9143a3f3ca216 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 22 Apr 2026 18:34:03 +0800 Subject: [PATCH 3/3] :art: The rendering process no longer crashes when pasting large amounts of `text/siyuan` content into the editor https://github.com/siyuan-note/siyuan/issues/17569 Signed-off-by: Daniel <845765@qq.com> --- app/electron/main.js | 5 +++++ app/src/protyle/util/paste.ts | 36 ++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/app/electron/main.js b/app/electron/main.js index 81f3f0929..9303ebb18 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -484,6 +484,11 @@ const initMainWindow = () => { } }); + currentWindow.webContents.on('render-process-gone', (event, details) => { + console.log('Reason: ', details.reason); + console.log('Exit code', details.exitCode); + }); + if (windowState.isDevToolsOpened) { currentWindow.webContents.openDevTools({mode: "bottom"}); } diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 1237edd9b..369057baa 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -375,9 +375,43 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven insertHTML(removeZWJ(textPlain).replace(/```/g, "\u200D```"), protyle); return; } else if (siyuanHTML) { + async function streamInsert(container: HTMLElement, bigHtmlString: string) { + const iframe = document.createElement('iframe'); + iframe.style.display = 'none'; + document.body.appendChild(iframe); + + const doc = iframe.contentWindow.document; + doc.open(); + + const chunkSize = 102400; + let offset = 0; + while (offset < bigHtmlString.length) { + const chunk = bigHtmlString.substring(offset, offset + chunkSize); + doc.write(chunk); + offset += chunkSize; + await new Promise(resolve => setTimeout(resolve, 0)); + } + + doc.close(); + + const fragment = document.createDocumentFragment(); + while (doc.body.firstChild) { + fragment.appendChild(doc.body.firstChild); + } + + container.innerHTML = ''; + container.appendChild(fragment); + + document.body.removeChild(iframe); + } + // 编辑器内部粘贴 const tempElement = document.createElement("div"); - tempElement.innerHTML = siyuanHTML; + if (1024 * 512 < siyuanHTML.length) { + await streamInsert(tempElement, siyuanHTML) + } else { + tempElement.innerHTML = siyuanHTML; + } if (range.toString()) { let types: string[] = []; let linkElement: HTMLElement;