Skip to content

fix: add input validation for CSV import (#554)#751

Open
AyeshaaRafaqat wants to merge 1 commit intoOWASP:mainfrom
AyeshaaRafaqat:fix/554-csv-input-validation
Open

fix: add input validation for CSV import (#554)#751
AyeshaaRafaqat wants to merge 1 commit intoOWASP:mainfrom
AyeshaaRafaqat:fix/554-csv-input-validation

Conversation

@AyeshaaRafaqat
Copy link

Fixes #554

  • Validates CRE column format matches XXX-XXX| pattern
  • Returns descriptive 400 error instead of generic 500
  • Handles triple-quoted text edge case

Tested locally by reproducing both cases from the issue.

@AyeshaaRafaqat
Copy link
Author

@northdpole would appreciate any feedback on the approach here happy to make changes based on your review.

@PRAteek-singHWY
Copy link
Contributor

PRAteek-singHWY commented Feb 22, 2026

Hi @AyeshaaRafaqat , thanks for working on this!

Just a heads up , this issue is also being addressed in PR #682 and PR #683 , which is currently under maintainer review. I hadn’t linked it to the issue earlier while working on it, because it was part of while I was working on MyOpenCRE milestone and was suggested by @northdpole to move my logic into "spreadsheet_parsers.py" with a new function
" def validate_import_csv_rows "

U can refer to this for more information -> #584 (comment)

Flagging this here so maintainers are aware of the overlap and can decide the best path forward. Appreciate the effort on this!
Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input validation missing on import csv functionality

2 participants