Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application crashes when max weight is invalid #2

Open
kewenlok opened this issue Apr 16, 2021 · 1 comment
Open

Application crashes when max weight is invalid #2

kewenlok opened this issue Apr 16, 2021 · 1 comment

Comments

@kewenlok
Copy link
Owner

kewenlok commented Apr 16, 2021

The application crashes when max weight modified in the profile.txt is invalid (eg. 99999999999999999999999999 or hello) due to lack of file input validation. As one of the requirements for tp is to allow users to edit data in the data file, it is crucial for developer to implement input validation and sanitisation for the data loaded from file or at least handle it in such a way that the application will not crash.

Steps to reproduce

  1. Run the application.
  2. Edit the current profile using the editprofile command.
  3. Exit the program.
  4. Edit the last field of the data/profile.txt into 99999999999999999999999999 and save it.
  5. Run the application.
  6. You will see an error as shown in the actual section below being thrown and the application crashed.

Expected

  1. Display an error message to user to inform them that the value is out of range and prompt them to enter the correct value.

Actual
Screenshot 2021-04-16 at 4.30.56 PM.png

@nus-pe-bot
Copy link

nus-pe-bot commented Apr 21, 2021

Team's Response

Thanks for the feedback! However, users are able to edit the contents of the data file via the application interface for certain tasks like altering deliveryman particulars and changing completion status of deliveries. The UG has warned against altering .txt files directly.

Items for the Tester to Verify

❓ Issue response

Team chose [response.NotInScope]

  • I disagree

Reason for disagreement: I do agree with the developer team that the UG has warned against altering of .txt files directly and hence, the medium severity instead of the high. Even though it is stated in UG that it may cause problems to the application, the team should still handle the error such that the program will not crash and show suitable error message to the user.


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

No branches or pull requests

2 participants