Spreadsheet import: a file name over about 106 characters overflows the timeline's actor column #463
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#463
Loading…
Reference in a new issue
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?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, readingcore/csv_import.performand importing a file with a long name on an in-memory database.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/csv_import.py:939(provenance), passed asactor=at:1017,:1021,:1023,:1025,:1037and:1045, and assummary=at:1042;applications/services.py,applications/models.pyandjobs/history.pyhave not moved.The text "Imported from " is written as the
actor(at most 120 characters) of every timeline entry the spreadsheet import makes, and as thesummary(at most 250) of one of them. Neither is shortened. Django keeps an uploaded file's name up to 255 characters, so any name longer than about 106 characters overflows the actor column. SQLite stores the long value silently. PostgreSQL, whichdocker/compose.postgres.ymlsets up, refuses it with aDataError, and the whole import, which runs in one transaction, fails with a server error.core/csv_import.py:944(provenance = str(_("Imported from %(file)s") % {"file": sheet.filename})), passed asactor=at:1022,:1026,:1028,:1030,:1042and:1050, and assummary=at:1047;applications/services.py:40-67(record_event), which stores both as given;applications/models.py:563(actor = models.CharField(..., max_length=120)).record_eventclipactorandsummaryto their columns, asjobs/history.pyalready does for listing events (ACTOR_MAX_CHARS,SUMMARY_MAX_CHARS).Done when
tests/test_csv_import.pyimports a sheet with a 250-character file name and asserts every event'sactoris at most 120 characters andsummaryat most 250.