Validate int() parsing of form year/month (raises 500 on bad input) #19

Open
opened 2026-06-06 19:58:13 +00:00 by tonym · 0 comments

Severity: medium
Category: bug
Location: app.py:1216,1238,1698,1762,1826,2012,2836

Problem

int(request.form.get('year')) raises on missing/empty fields (ValueError/TypeError) -> 500 across several routes.

Suggested fix

Add a parse_int(value, default) helper / int(request.form.get('year') or date.today().year).

Filed by automated code review.

**Severity:** medium **Category:** bug **Location:** `app.py:1216,1238,1698,1762,1826,2012,2836` ### Problem `int(request.form.get('year'))` raises on missing/empty fields (ValueError/TypeError) -> 500 across several routes. ### Suggested fix Add a `parse_int(value, default)` helper / `int(request.form.get('year') or date.today().year)`. _Filed by automated code review._
tonym added the
bug
severity:medium
labels 2026-06-06 19:58:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bonna61/Moon-Household-Budget#19
No description provided.