]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fixes a couple of minor bugs in the downloading of documents and additional consumer...
authorTrenton Holmes <holmes.trenton@gmail.com>
Fri, 1 Apr 2022 18:12:18 +0000 (11:12 -0700)
committerTrenton Holmes <holmes.trenton@gmail.com>
Fri, 1 Apr 2022 18:12:18 +0000 (11:12 -0700)
src/documents/views.py
src/paperless/settings.py

index 0564e546960b604ed36d0e4f021278b2e300e499..f2e894ee42f6cb4f54dfcab9b39366bba4c61655 100644 (file)
@@ -6,7 +6,7 @@ import zipfile
 from datetime import datetime
 from time import mktime
 from unicodedata import normalize
-from urllib.parse import quote_plus
+from urllib.parse import quote
 
 from django.conf import settings
 from django.db.models import Case
@@ -244,7 +244,7 @@ class DocumentViewSet(
         # RFC 5987 addresses this issue
         # see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2
         filename_normalized = normalize("NFKD", filename).encode("ascii", "ignore")
-        filename_encoded = quote_plus(filename)
+        filename_encoded = quote(filename)
         content_disposition = (
             f"{disposition}; "
             f'filename="{filename_normalized}"; '
index d485c5a5002ec75d2e5545c7a34d8dda8f3343bd..475315c9342b8ab0b3c8f4bcaf2b8b60d13a5295 100644 (file)
@@ -455,7 +455,7 @@ CONSUMER_IGNORE_PATTERNS = list(
     json.loads(
         os.getenv(
             "PAPERLESS_CONSUMER_IGNORE_PATTERNS",
-            '[".DS_STORE/*", "._*", ".stfolder/*"]',
+            '[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]',
         ),
     ),
 )