Pay button 403 error traced to clashing Referrer-Policy and origin check
For several days, customers pressing Pay by card on CloseQuotely invoices were shown a Forbidden page and Stripe was never reached. The cause was a privacy setting, no-referrer, which made browsers send an Origin header of null on same-site form posts. This clashed with a CSRF origin check that rejected anything other than the app's own origin. The team fixed it by using same-origin referrer policy on invoice and quote pages and accepting a null Origin only when Sec-Fetch-Site confirms a same-origin request. Refusals now redirect customers back to the bill with a message and are logged. Card payments have been working again since the fix.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in