1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

[bug] report error on invalid encoding in members import

This commit is contained in:
Sylvain 2020-03-31 16:53:30 +02:00
parent f596859c78
commit 570f61c5df
2 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,7 @@
- Fix a bug: missing translations for some error messages
- Fix a bug: invalid footprints in invoices fixtures
- Fix a bug: unable to export accounting data to ACD
- Fix a bug: report error on invalid encoding in members import
- Fix a security issue: updated mkdirp to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598)
- Fix a security issue: updated acorn to fix [CVE-2020-7598](https://nvd.nist.gov/vuln/detail/CVE-2020-7598)
- Fix a security issue: updated actionview to fix [CVE-2020-5267](https://nvd.nist.gov/vuln/detail/CVE-2020-5267)

View File

@ -6,6 +6,7 @@ class Members::ImportService
def import(import)
require 'csv'
log = []
begin
CSV.foreach(import.attachment.url, headers: true, col_sep: ';') do |row|
begin
password = hide_password(row)
@ -31,6 +32,11 @@ class Members::ImportService
puts e.backtrace
end
end
rescue ArgumentError => e
log << e.to_s
puts e
puts e.backtrace
end
log
end