Skip to content

Commit

Permalink
feat: add pay.ideal.nl to URL whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
leuke-naam committed Dec 30, 2024
1 parent 0d85b36 commit 5d7ed4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/members/payments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def pay_activities
end

# Check if it's a valid URI and matches your whitelist of acceptable domains (e.g., only http(s)://example.com)
if url.is_a?(URI::HTTP) && ['www.mollie.com'].include?(url.host)
if url.is_a?(URI::HTTP) && [
'www.mollie.com', # staging
'pay.ideal.nl', # production
].include?(url.host)
redirect_to(url.to_s)
else
# Fallback to a safe default redirect if the URI is invalid or not in the whitelist
Expand Down

0 comments on commit 5d7ed4d

Please sign in to comment.