File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -258,26 +258,6 @@ def rates
258
258
#
259
259
# bank.get_rate("USD", "CAD") #=> 1.24515
260
260
# bank.get_rate("CAD", "USD") #=> 0.803115
261
- def import_rates ( format , s , opts = { } )
262
- raise Money ::Bank ::UnknownRateFormat unless RATE_FORMATS . include? ( format )
263
-
264
- if format == :ruby
265
- warn '[WARNING] Using :ruby format when importing rates is potentially unsafe and ' \
266
- 'might lead to remote code execution via Marshal.load deserializer. Consider using ' \
267
- 'safe alternatives such as :json and :yaml.'
268
- end
269
-
270
- store . transaction do
271
- data = FORMAT_SERIALIZERS [ format ] . load ( s )
272
-
273
- data . each do |key , rate |
274
- from , to = key . split ( SERIALIZER_SEPARATOR )
275
- store . add_rate from , to , rate
276
- end
277
- end
278
-
279
- self
280
- end
281
261
end
282
262
end
283
263
end
You can’t perform that action at this time.
0 commit comments