Commit 181e23d
committed
fix(security): sandbox mdviewer iframe without allow-same-origin
- Remove allow-same-origin from mdviewer sandbox to prevent malicious
scripts in rendered markdown from accessing Phoenix context
- Strip allow-forms, allow-modals, allow-pointer-lock (not needed)
- No sandbox in test windows for integration test compatibility
- Silently ignore "null" origin messages in EventManager (sandboxed iframes)
- Switch slash-menu frecency to in-memory store (localStorage unavailable)1 parent e89b50f commit 181e23d
3 files changed
Lines changed: 29 additions & 6 deletions
File tree
- src-mdviewer/src/components
- src
- extensionsIntegrated/Phoenix-live-preview
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | | - | |
84 | | - | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
133 | 149 | | |
134 | 150 | | |
135 | 151 | | |
| |||
906 | 922 | | |
907 | 923 | | |
908 | 924 | | |
909 | | - | |
| 925 | + | |
910 | 926 | | |
911 | | - | |
| 927 | + | |
912 | 928 | | |
913 | 929 | | |
914 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
0 commit comments