Skip to content

Commit

Permalink
Add pay.ideal.nl to URL whitelist (#1148)
Browse files Browse the repository at this point in the history
* feat: add `pay.ideal.nl` to URL whitelist

* chore: conform to linter

---------

Co-authored-by: Silas <[email protected]>
  • Loading branch information
leuke-naam and SilasPeters authored Dec 30, 2024
1 parent 0d85b36 commit 552f169
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 552f169

Please sign in to comment.