You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: modernize UserItem.CSVImport - use csv module for parsing #1846
UserItem.CSVImport has some internal design smells worth cleaning up.
1. Use the csv module for parsing. Today the code does line.split(","), which misaligns whenever a field contains a comma - a password like "my,pa\$\$w0rd", a display name like "Smith, John". The column-1 mask added in #1829 only covers what lands in column 1; bytes that spill into column 2+ still leak (see test_password_with_comma_partially_masks). csv.reader also handles quoted values, CRLF, and BOM deliberately rather than coincidentally.
2. Consolidate two username extractions.validate_file_for_import uses line.partition(",")[0].strip(), while _validate_import_line_or_throw uses list(map(str.strip, line.split(",")))[USERNAME]. Same result today, but a maintenance hazard. A csv.reader migration collapses both.
3. Align error handling in create_user_from_line. It returns None for empty input but raises ValueError for too many columns. Pick one convention.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Activity
github-actions commentedon Oct 1, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
github-actions commentedon Oct 16, 2026
Closing due to inactivity. If this is still relevant, please reopen or file a new issue.