We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
redirect_to
1 parent b697f7b commit ec9f767Copy full SHA for ec9f767
app/controllers/members/payments_controller.rb
@@ -45,6 +45,7 @@ def pay_activities
45
transaction_type: :activity,
46
redirect_uri: member_payments_path
47
)
48
+
49
if payment.save
50
# Check URI for safety (supresses brakeman warning)
51
url = begin
@@ -55,7 +56,7 @@ def pay_activities
55
56
57
# Check if it's a valid URI and matches your whitelist of acceptable domains (e.g., only http(s)://example.com)
58
if url.is_a?(URI::HTTP) && ['mollie.com'].include?(url.host)
- redirect_to(url)
59
+ redirect_to(url.to_s)
60
else
61
# Fallback to a safe default redirect if the URI is invalid or not in the whitelist
62
redirect_to(root_path)
0 commit comments