Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

The consumer hook shouldn't contain the passphrase. That was a bad idea

Daniel Quinne0ce2a76567d
diff --git a/docs/consumption.rst b/docs/consumption.rst
index a84bea80b..2efab20ad 100644
--- a/docs/consumption.rst
+++ b/docs/consumption.rst
@@ -64,8 +64,6 @@ What Can This Script Do?
It's your script, so you're only limited by your imagination and the laws of
physics. However, the following values are passed to the script in order:
-* The value of ``PAPERLESS_PASSPHRASE``, which is used to encrypt your
- documents
* Document id
* Generated file name
* Source path
diff --git a/scripts/post-consumption-example.sh b/scripts/post-consumption-example.sh
index a4b006de3..6edd3e158 100755
--- a/scripts/post-consumption-example.sh
+++ b/scripts/post-consumption-example.sh
@@ -1,14 +1,13 @@
#!/usr/bin/env bash
-PASSPHRASE=${1}
-DOCUMENT_ID=${2}
-DOCUMENT_FILE_NAME=${3}
-DOCUMENT_SOURCE_PATH=${4}
-DOCUMENT_THUMBNAIL_PATH=${5}
-DOCUMENT_DOWNLOAD_URL=${6}
-DOCUMENT_THUMBNAIL_URL=${7}
-DOCUMENT_CORRESPONDENT=${8}
-DOCUMENT_TAGS=${9}
+DOCUMENT_ID=${1}
+DOCUMENT_FILE_NAME=${2}
+DOCUMENT_SOURCE_PATH=${3}
+DOCUMENT_THUMBNAIL_PATH=${4}
+DOCUMENT_DOWNLOAD_URL=${5}
+DOCUMENT_THUMBNAIL_URL=${6}
+DOCUMENT_CORRESPONDENT=${7}
+DOCUMENT_TAGS=${8}
echo "
diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py
index 5c513b781..3c7700170 100644
--- a/src/documents/signals/handlers.py
+++ b/src/documents/signals/handlers.py
@@ -64,7 +64,6 @@ def run_external_script(sender, document, **kwargs):
Popen((
settings.POST_CONSUME_SCRIPT,
- settings.PASSPHRASE,
str(document.id),
document.file_name,
document.source_path,