Commit 6035020
committed
fix(webapp): sanitize streamed agent URLs before rendering in the agent view
URLs in source-url and file message parts come from streamed agent/tool data,
so an unsafe scheme like javascript: rendered straight into an href/src was a
clickable XSS payload. Allow only http(s)/blob (and data:image for inline
images); unsafe values render as plain text instead of a link or image.1 parent 3bc88c4 commit 6035020
3 files changed
Lines changed: 85 additions & 4 deletions
File tree
- .server-changes
- apps/webapp
- app/components/runs/v3/agent
- test/components/runs/v3/agent
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 46 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
80 | 101 | | |
81 | 102 | | |
82 | 103 | | |
| |||
159 | 180 | | |
160 | 181 | | |
161 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
162 | 193 | | |
163 | 194 | | |
164 | 195 | | |
165 | | - | |
| 196 | + | |
166 | 197 | | |
167 | 198 | | |
168 | 199 | | |
169 | 200 | | |
170 | | - | |
| 201 | + | |
171 | 202 | | |
172 | 203 | | |
173 | 204 | | |
| |||
187 | 218 | | |
188 | 219 | | |
189 | 220 | | |
| 221 | + | |
| 222 | + | |
190 | 223 | | |
191 | 224 | | |
192 | 225 | | |
193 | | - | |
| 226 | + | |
194 | 227 | | |
195 | 228 | | |
196 | 229 | | |
197 | 230 | | |
198 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
199 | 241 | | |
200 | 242 | | |
201 | 243 | | |
202 | | - | |
| 244 | + | |
203 | 245 | | |
204 | 246 | | |
205 | 247 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments