Skip to content

Commit ec9f767

Browse files
committed
fix: pass stirng to redirect_to funciton
1 parent b697f7b commit ec9f767

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/controllers/members/payments_controller.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def pay_activities
4545
transaction_type: :activity,
4646
redirect_uri: member_payments_path
4747
)
48+
4849
if payment.save
4950
# Check URI for safety (supresses brakeman warning)
5051
url = begin
@@ -55,7 +56,7 @@ def pay_activities
5556

5657
# Check if it's a valid URI and matches your whitelist of acceptable domains (e.g., only http(s)://example.com)
5758
if url.is_a?(URI::HTTP) && ['mollie.com'].include?(url.host)
58-
redirect_to(url)
59+
redirect_to(url.to_s)
5960
else
6061
# Fallback to a safe default redirect if the URI is invalid or not in the whitelist
6162
redirect_to(root_path)

0 commit comments

Comments
 (0)