OpenCRE icon indicating copy to clipboard operation
OpenCRE copied to clipboard

Input validation missing on import csv functionality

Open filipposfwt opened this issue 2 years ago • 8 comments

Issue

When importing a new standard, no validation is performed on the imported csv file, a generic non-descriptive "500 - Internal Server Error" is returned or new CREs are wrongfully injected.

More specifically, in the outlined case, if the format of "CRE 0" column is XX-XXX| instead of XXX-XXX|, a non-descriptive error is returned. Also, I noticed that if in the "<standard_name>|name" column the requirement's text is enclosed between three double quotes '"""', the csv is treated as valid and the whole row is entered as a new root CRE.

image

filipposfwt avatar Sep 18 '24 10:09 filipposfwt

Hi ,@northdpole , @filipposfwt

I have reviewed the issue and identified the missing input validation in the CSV import functionality. I plan to implement validation checks for headers, data formats, and security measures (such as preventing CSV injection). I will also ensure proper error handling and testing before submitting a fix.

Please assign this issue to me so I can start working on it. Let me know if you have any specific requirements or suggestions.

Thanks!

Hardik301002 avatar Mar 16 '25 08:03 Hardik301002

@Hardik301002 just assigned

northdpole avatar Mar 22 '25 14:03 northdpole

Hi! I noticed there hasn’t been any activity here recently. If it’s okay, I’d like to work on this issue. Could you please assign it to me if it’s available?

sd2604 avatar Nov 08 '25 12:11 sd2604

Hi!@northdpole .I'd like to work on this issue. Could you please assign it to me? Ill make sure to submit a clean PR with tests and documentation .

ghost avatar Jan 18 '26 13:01 ghost

Hi @northdpole @filipposfwt

I’d like to work on this issue. I plan to reproduce the problem and add proper validation for the CSV import along with clearer error handling.

Could you please assign this issue to me? Thanks!

muskan013-byte avatar Feb 19 '26 12:02 muskan013-byte

Hi @northdpole I'd like to work on this. I can reproduce both issues (malformed CRE column format and triple quoted text being treated as root CRE) and implement proper input validation with descriptive error messages. Could you assign this to me?

AyeshaaRafaqat avatar Feb 21 '26 22:02 AyeshaaRafaqat

Hi @northdpole and @filipposfwt,

I noticed that a PR (#751) was recently opened addressing this issue. If there are any remaining edge cases or improvements needed around the CSV validation logic (e.g., additional format checks, better error reporting, or test coverage), I would be happy to help contribute.

Please let me know if there is anything still pending on this issue that I could assist with. Thanks!

Yashwin-i avatar Mar 04 '26 05:03 Yashwin-i

Hey there, is the issue still active and the actual case isn't solved? If not, can i give it a try?

jeffrey-theog06 avatar Jul 06 '26 10:07 jeffrey-theog06