Sfoglia il codice sorgente

Remove lesser-used archive formats from WAGTAILDOCS_EXTENSIONS list

Matt Westcott 1 anno fa
parent
commit
92d1ff5d7a

+ 1 - 1
docs/advanced_topics/add_to_django_project.md

@@ -343,7 +343,7 @@ WAGTAIL_SITE_NAME = 'My Project'
 # This can be omitted to allow all files, but note that this may present a security risk
 # if untrusted users are allowed to upload files -
 # see https://docs.wagtail.org/en/stable/advanced_topics/deploying.html#user-uploaded-files
-WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
+WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']
 
 # Reverse the default case-sensitive handling of tags
 TAGGIT_CASE_INSENSITIVE = True

+ 1 - 1
docs/getting_started/integrating_into_django.md

@@ -67,7 +67,7 @@ If this setting is not present, Wagtail will fall back to `request.site.root_url
 Add a `WAGTAILDOCS_EXTENSIONS` setting to specify the file types that Wagtail will allow to be uploaded as documents. This can be omitted to allow all file types, but this may present a security risk if untrusted users are allowed to upload documents - see [](user_uploaded_files).
 
 ```python
-WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
+WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']
 ```
 
 Various other settings are available to configure Wagtail's behaviour - see [Settings](/reference/settings).

+ 1 - 1
wagtail/project_template/project_name/settings/base.py

@@ -177,4 +177,4 @@ WAGTAILADMIN_BASE_URL = "http://example.com"
 # This can be omitted to allow all files, but note that this may present a security risk
 # if untrusted users are allowed to upload files -
 # see https://docs.wagtail.org/en/stable/advanced_topics/deploying.html#user-uploaded-files
-WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
+WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']