Commit ac182cc
committed
fix: restrict URL schemes in page navigation to http/https
The new_page and navigate_page tools pass user-provided URLs directly to
page.goto() without validating the URL scheme. This allows navigating to
potentially dangerous schemes like file://, chrome://, or data: URLs.
Add URL scheme validation that restricts navigation to http:, https:,
and about: schemes.1 parent 8d765c0 commit ac182cc
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
| |||
96 | 114 | | |
97 | 115 | | |
98 | 116 | | |
| 117 | + | |
99 | 118 | | |
100 | 119 | | |
101 | 120 | | |
| |||
193 | 212 | | |
194 | 213 | | |
195 | 214 | | |
| 215 | + | |
196 | 216 | | |
197 | 217 | | |
198 | 218 | | |
| |||
0 commit comments