geraldkoh4 / pe

0 stars 0 forks source link

There should be a check for the correct number of fields. #10

Open geraldkoh4 opened 1 year ago

geraldkoh4 commented 1 year ago

image.png

An incorrect number of fields can be added perpetually.

soc-se-bot commented 1 year ago

Team's Response

No details provided by team.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

There is no checks for loading up of save file

image.png

Since a correct input was accepted and it has exited successfully. But the input has crashed the application due to the loading up of the save file. This means that as a user, I can no longer use that safe file unless i go and find out what is wrong in the safe file.


[original: nus-cs2113-AY2223S2/pe-interim#2098] [original labels: type.FunctionalityBug severity.Medium]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Because the user is inputting overzealous input validation, it is considered a FeaturFlaw.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: One refers to the use of the application in CLI, which should be parsed correctly, while the 2nd issue refers to the save file not being parsed at all. They are not the same.


## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [x] I disagree **Reason for disagreement:** ![image.png](https://raw.githubusercontent.com/geraldkoh4/pe/main/files/aa34ef09-7b79-4351-8fee-0948fbf92459.png) ![image.png](https://raw.githubusercontent.com/geraldkoh4/pe/main/files/66dcf884-11fd-403b-9fe4-237e9e9e3864.png) "A legitimate user behavior is not handled e.g. incorrect commands, extra parameters" There are extra parameters. It is a functionality bug as stated.
## :question: Issue severity Team chose [`severity.Medium`] Originally [`severity.Low`] - [x] I disagree **Reason for disagreement:** ![image.png](https://raw.githubusercontent.com/geraldkoh4/pe/main/files/0de37d33-d537-4dd9-9096-472619440d05.png) ![image.png](https://raw.githubusercontent.com/geraldkoh4/pe/main/files/37a7a60c-a55c-4b70-afcf-13b356c714cd.png) This is due to product design. In this case, what I think is happening is that the string is separated by " " (whitespace). But consider this. /cadd fried rice with eggs, sausage, carrots and chicken 500 The string is a perfectly normal user input to enter, with spaces and commas. But according to how they parse it, there are actually 10 fields (9 white spaces) when there should only be 3 accepted. As seen in my original issue, you can put in as many spaces as you want. This means that there is no check for the number of spaces. Functionality bug : "A legitimate user behavior is not handled e.g. incorrect commands, extra parameters" Severity: A very common user input is not correctly handled, but it (the additional fields) does not crash the program. Hence, the severity should still be medium. (The command crashes the program due to the presence of "," which could have stopped most user inputs from failing due to limiting the amount of " ").