mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fixes Rubocop SecurityOpen offense
This commit is contained in:
@@ -238,11 +238,6 @@ Rails/UniqueValidationWithoutIndex:
|
||||
- 'app/models/spree/tax_category.rb'
|
||||
- 'app/models/spree/zone.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Security/Open:
|
||||
Exclude:
|
||||
- 'app/services/image_importer.rb'
|
||||
|
||||
# Offense count: 23
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
class ImageImporter
|
||||
def import(url, product)
|
||||
valid_url = URI.parse(url)
|
||||
file = open(valid_url.to_s)
|
||||
file = File.open(valid_url.to_s)
|
||||
filename = File.basename(valid_url.path)
|
||||
|
||||
Spree::Image.create(
|
||||
|
||||
Reference in New Issue
Block a user