Repository navigation
Commit 9a6ea91
committed
Prevent prompt injection by validating target URL origin during chat initialization
- [Pasted text]
├── apps
│ └── browser
│ └── src
│ ├── background
│ │ ├── clear-chat-init-data.ts
│ │ ├── main.ts
│ │ ├── message-handler.ts
│ │ └── websocket.ts
│ ├── content-scripts
│ │ └── send-prompt-content-script
│ │ ├── chatbots
│ │ │ └── open-webui.ts
│ │ └── send-prompt-content-script.ts
│ ├── manifest.json
│ └── types
│ └── messages.ts
└── packages
└── shared
└── src
└── types
└── websocket-message.ts1 parent b0e03aa commit 9a6ea91
2 files changed
Lines changed: 24 additions & 27 deletions
File tree
- apps/browser/src
- background
- content-scripts/send-prompt-content-script
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 31 | | |
56 | 32 | | |
57 | 33 | | |
| |||
80 | 56 | | |
81 | 57 | | |
82 | 58 | | |
83 | | - | |
| 59 | + | |
84 | 60 | | |
85 | 61 | | |
86 | 62 | | |
| |||
119 | 95 | | |
120 | 96 | | |
121 | 97 | | |
122 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
123 | 103 | | |
124 | 104 | | |
125 | 105 | | |
| |||
143 | 123 | | |
144 | 124 | | |
145 | 125 | | |
146 | | - | |
| 126 | + | |
| 127 | + | |
147 | 128 | | |
148 | 129 | | |
149 | 130 | | |
150 | 131 | | |
151 | 132 | | |
152 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
153 | 137 | | |
154 | 138 | | |
155 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
219 | 232 | | |
220 | 233 | | |
221 | 234 | | |
| |||
0 commit comments