mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-30 01:32:25 +01:00
feat(editor): harden photo editor security and interactions
This commit is contained in:
@@ -20,8 +20,9 @@ def test_editor_paste_owns_clipboard_images_while_editor_open():
|
||||
"""
|
||||
src = SRC.read_text(encoding="utf-8")
|
||||
assert "wireClipboardAndDrop" in src
|
||||
# The bail-out must be scoped to targets inside the editor.
|
||||
assert "const insideEditor = target && container && container.contains(target);" in src
|
||||
# The bail-out must be scoped to targets inside the editor, and must not
|
||||
# throw for a paste whose target is not a Node (e.g. dispatched at window).
|
||||
assert "const insideEditor = target instanceof Node && !!container && container.contains(target);" in src
|
||||
assert (
|
||||
"if (insideEditor && (target.isContentEditable || "
|
||||
"target.closest?.('input, textarea, select'))) return;"
|
||||
|
||||
Reference in New Issue
Block a user