Zhengwinter / pe

0 stars 0 forks source link

Exception thrown and program crashes when trying to mark out of bound index #7

Open Zhengwinter opened 7 months ago

Zhengwinter commented 7 months ago

image.png

When trying to mark and a task belonging to index "0" on a particular day with an existing task, the program crashes with an "IndexOutOfBounds" exception.

nus-se-script commented 6 months ago

Team's Response

The error can be produced only specific conditions, when the user does not the user guide given.

Conditions for this error to be reproduced: Task already added into the day, and user inputs in index of 0 for the task. (All other invalid cases are handled including negative numbers and non-integers)

This is an extreme edge case that should not affect majority of the users.

Items for the Tester to Verify

:question: Issue severity

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

Reason for disagreement: I disagree with the reasons given in a few places.

Firstly, the developers cannot expect users to follow the user guide exactly to the tee, there are bound to be unintentional inputs or even possibility of attacks by malicious users. It is hence the responsibility of the developers to guard against such possibilities.

Secondly, I disagree that this is an "extreme edge case". "0" is an input that is very likely to be entered for the below reasons

  1. Programmers are used to indexes starting with "0"
  2. "0" is right beside "9" on the keyboard, making it very probable for "0" to be pressed when the user tries to press "9"
  3. "0" is one of the first edge case that a tester should be considering given that it is exactly on the border between "valid" inputs and those that should be considered as "invalid"

For the above reasons, I would argue that the severity of this bug should be high because it is not as unlikely as the developer team makes it out to be and it should not have been missed when the developer team was testing the code.