Bläddra i källkod

Forward-port release notes for v2.0.4

master
Samir Shah 5 år sedan
förälder
incheckning
d0a8bae68e
2 ändrade filer med 35 tillägg och 0 borttagningar
  1. 1
    0
      docs/source/releases/index.rst
  2. 34
    0
      docs/source/releases/v2.0.4.rst

+ 1
- 0
docs/source/releases/index.rst Visa fil

@@ -14,6 +14,7 @@ Release notes for each version of Oscar published to PyPI.
14 14
     v2.0.1
15 15
     v2.0.2
16 16
     v2.0.3
17
+    v2.0.4
17 18
 
18 19
 
19 20
 1.6 release branch

+ 34
- 0
docs/source/releases/v2.0.4.rst Visa fil

@@ -0,0 +1,34 @@
1
+=======================
2
+Oscar 2.0.4 release notes
3
+=======================
4
+
5
+:release: 2019-12-05
6
+
7
+This is Oscar 2.0.4, a security release.
8
+
9
+Security fixes
10
+==============
11
+
12
+The file handling behaviour of uploaded CSV files for ranges (handled by
13
+``RangeProductListView``) has been modified to address a potential security
14
+risk when invalid files are uploaded, as these would previously be left on disk
15
+if parsing of the uploaded file failed.
16
+
17
+Uploaded files are no longer written to disk by Oscar, but processed directly
18
+from the temporary uploaded file.
19
+
20
+This means that ``RangeProductFileUpload.filepath`` no longer stores a
21
+reference to the stored path of an uploaded file, but only its file name for
22
+reporting purposes. The ``filename`` property of ``RangeProductFileUpload``
23
+has been removed.
24
+
25
+The ``RangeProductListView.create_upload_object``,
26
+``RangeProductFileUpload.process`` and ``RangeProductFileUpload.extract_ids``
27
+methods now both expect a file object as a positional argument.
28
+Projects that have overridden any of these methods will need to make
29
+corresponding changes.
30
+
31
+The ``OSCAR_UPLOAD_ROOT`` setting which was used exclusively by this feature has
32
+been removed.
33
+
34
+Thanks to Mina Mohsen Edwar for reporting this issue.

Laddar…
Avbryt
Spara