Commit c9f2a06
fix(security): pin IMAP connections to validated resolved IP
Pass the resolved IP from validateDatabaseHost to ImapFlow as host,
with the original hostname as servername for TLS SNI verification.
Closes the DNS TOCTOU rebinding window.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d747565 commit c9f2a06
File tree
2 files changed
+20
-7
lines changed- apps/sim
- app/api/tools/imap/mailboxes
- lib/webhooks
2 files changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
203 | | - | |
| 207 | + | |
| 208 | + | |
204 | 209 | | |
205 | 210 | | |
206 | 211 | | |
| |||
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
270 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
271 | 280 | | |
272 | | - | |
| 281 | + | |
| 282 | + | |
273 | 283 | | |
274 | 284 | | |
275 | 285 | | |
| |||
563 | 573 | | |
564 | 574 | | |
565 | 575 | | |
566 | | - | |
| 576 | + | |
| 577 | + | |
567 | 578 | | |
568 | 579 | | |
569 | 580 | | |
570 | 581 | | |
571 | 582 | | |
572 | | - | |
| 583 | + | |
| 584 | + | |
573 | 585 | | |
574 | 586 | | |
575 | 587 | | |
| |||
0 commit comments