Skip to content

Commit

Permalink
Fix security warnings from brakeman
Browse files Browse the repository at this point in the history
  • Loading branch information
aidewoode committed Oct 3, 2024
1 parent 4c0da3b commit aa54c42
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/concerns/filterable_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def filter_by_associations(associations)
Array(attrs).each do |attr|
filter_name = "#{name}_#{attr}"
scope "filter_by_#{filter_name}", ->(value) {
joins(name).where("#{name}.#{attr}" => value)
joins(name.to_sym).where(name => {attr => value})
}

self::VALID_FILTERS.push(filter_name.to_s)
Expand Down
2 changes: 1 addition & 1 deletion app/models/media_listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def running?
private

def run(command)
system "bundle exec #{SERVICE_PATH} #{command} -d #{self.class.config.pid_dir} -n #{self.class.config.service_name}"
system "bundle exec #{SERVICE_PATH.shellescape} #{command.shellescape} -d #{self.class.config.pid_dir.shellescape} -n #{self.class.config.service_name.shellescape}"
end
end
1 change: 0 additions & 1 deletion test/system/setting_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class SettingSystemTest < ApplicationSystemTestCase
assert_text("Updated successfully")
end


test "update discogs token" do
visit setting_url

Expand Down

0 comments on commit aa54c42

Please sign in to comment.