diff --git a/app/utils/SuccessLog.js b/app/utils/SuccessLog.js
index 297b566..2fdd9cc 100644
--- a/app/utils/SuccessLog.js
+++ b/app/utils/SuccessLog.js
@@ -70,7 +70,7 @@ export class SuccessLog {
* - Updates `this.#hashes` (so it doesn't need to reload from file)
*
* @param {string} identifier - Can be an IP or access key
- * @param {string} why - Reason for creating this archive
+ * @param {string} why - Reason for creating this archive (500 chars max).
* @param {Buffer} pdfBytes - Used to store a SHA512 hash of the PDF that was delivered
*/
add(identifier, why, pdfBytes) {
@@ -86,6 +86,8 @@ export class SuccessLog {
.replaceAll("{", "")
.replaceAll("}", "");
+ why = why.substring(0, 500);
+
// Save entry
const entry = `${new Date().toISOString()}\t${identifier}\t${why}\tsha512-${hash}\n`;
fs.appendFileSync(SuccessLog.filepath, entry);
diff --git a/docs/utils/SuccessLog.md b/docs/utils/SuccessLog.md
index 5014a06..f9c69f3 100644
--- a/docs/utils/SuccessLog.md
+++ b/docs/utils/SuccessLog.md
@@ -53,7 +53,7 @@ Calculates hash of a PDF an:
| Param | Type | Description |
| --- | --- | --- |
| identifier | string
| Can be an IP or access key |
-| why | string
| Reason for creating this archive |
+| why | string
| Reason for creating this archive (500 chars max). |
| pdfBytes | Buffer
| Used to store a SHA512 hash of the PDF that was delivered |