Commit 69250b6
committed
fix: allow booking submission from the booking page when embedded in an iframe
Booking::register ran a custom CSRF check that compared the submitted
csrf_token field against the csrf_cookie value read from the request
cookies. When the booking page is embedded in a cross-origin iframe,
browsers do not send that cookie along with the POST (SameSite /
third-party cookie restrictions), so the check failed with 'Security
validation failed. Please refresh the page and try again.'.
The booking/* URI is already excluded from the global CSRF protection,
and Booking::register has its own rate limiting, CAPTCHA / ALTCHA
verification (when enabled) and strict input validation, so the
duplicate cookie-based check provided no additional security while
breaking iframe embedding. Removed it.1 parent 087e0b8 commit 69250b6
2 files changed
Lines changed: 1 addition & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 85 | | |
102 | 86 | | |
103 | 87 | | |
| |||
374 | 358 | | |
375 | 359 | | |
376 | 360 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | 361 | | |
381 | 362 | | |
382 | 363 | | |
| |||
0 commit comments