Skip to content

Commit

Permalink
fix: resolved linter warning
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasPeters committed Dec 20, 2024
1 parent 3d27e23 commit 1207191
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions app/controllers/members/payments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ def pay_activities
)
if payment.save
# Check URI for safety (supresses brakeman warning)
if payment.payment_uri =~ URI::regexp
url = URI.parse(payment.payment_uri)
else
url = nil
end
url = (URI.parse(payment.payment_uri) if payment.payment_uri =~ URI::DEFAULT_PARSER.make_regexp)
redirect_to(url)
else
flash[:notice] = I18n.t('failed', scope: 'activerecord.errors.models.payment')
Expand Down Expand Up @@ -111,11 +107,7 @@ def add_funds

if payment.save
# Check URI for safety (supresses brakeman warning)
if payment.payment_uri =~ URI::regexp
url = URI.parse(payment.payment_uri)
else
url = nil
end
url = (URI.parse(payment.payment_uri) if payment.payment_uri =~ URI::DEFAULT_PARSER.make_regexp)
redirect_to(url)
else
flash[:warning] = I18n.t('failed', scope: 'activerecord.errors.models.payment')
Expand Down

0 comments on commit 1207191

Please sign in to comment.