lucas-sc0 / pe

0 stars 0 forks source link

Corruption to description field will result in program crash #6

Open lucas-sc0 opened 3 days ago

lucas-sc0 commented 3 days ago

If there is a corruption in description field, program will infinite loop and crash on next run. This could potentially be a big issue as if there are thousands of transactions, just one of the descriptions need to be corrupted for this to happen. It would be very hard for user to find the error manually and program cannot be relaunched until json file is either deleted or that line is mended. I gave this a severity high because program is unusable state if this happen. It might not happen because a user editing json file directly as well. It may have just been a result of file corruption.

image.png

image.png

image.png

Steps to replicate add a transaction close the program edit description to simulate corruption run the program

nus-pe-script commented 6 hours ago

[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]

Team's Response

Thanks for raising this. It is a bug, which I fail to address in the UG. The reason should be gson conversion does not take the JSON file line by line but object by object instead. I choose medium because I agree that it can be bettered but I do not think this issue will affect most users as it is not recommended to edit JSON file directly (as addressed in UG).

image.png

Items for the Tester to Verify

:question: Issue severity

Team chose [severity.Medium] Originally [severity.High]

Reason for disagreement: [replace this with your reason]