mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
add allow_other_host: true to redirect_to to avoid raising ActionController::Redirecting::UnsafeRedirectError
Exemple: https://github.com/openfoodfoundation/openfoodnetwork/actions/runs/8281744847/job/22660933543?pr=12209#step:10:158 Reference: https://blog.saeloun.com/2022/02/08/rails-7-raise-unsafe-redirect-error/
This commit is contained in:
@@ -24,7 +24,7 @@ module PaymentGateways
|
||||
# At this point Paypal has *provisionally* accepted that the payment can now be placed,
|
||||
# and the user will be redirected to a Paypal payment page. On completion, the user is
|
||||
# sent back and the response is handled in the #confirm action in this controller.
|
||||
redirect_to provider.express_checkout_url(pp_response, useraction: 'commit')
|
||||
redirect_to provider.express_checkout_url(pp_response, useraction: 'commit'), allow_other_host: true
|
||||
else
|
||||
flash[:error] =
|
||||
Spree.t(
|
||||
|
||||
@@ -63,7 +63,7 @@ module Spree
|
||||
Bugsnag.notify(e)
|
||||
flash[:error] = e.message
|
||||
ensure
|
||||
redirect_to request.referer
|
||||
redirect_to request.referer, allow_other_host: true
|
||||
end
|
||||
|
||||
def paypal_refund
|
||||
|
||||
Reference in New Issue
Block a user