Cap pasted statement text size before regex parsing #8
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium
Category: security
Location:
app.py:1757-1922Problem
/debts/add-from-statementand/debts/parse-statementaccept unbounded free text and run regex on it — a megabyte paste is a CPU-DoS vector.Suggested fix
Truncate
textto e.g. 100KB before processing (MAX_CONTENT_LENGTH also helps).Filed by automated code review.