Ch40gRv1-Mu / pe

0 stars 0 forks source link

Unhandled exception thrown when user change the data file manually #14

Open Ch40gRv1-Mu opened 2 years ago

Ch40gRv1-Mu commented 2 years ago

Screen Shot 2022-04-16 at 5.09.49 PM.png

Screen Shot 2022-04-16 at 5.10.23 PM.png The app simply cannot restart and DOS.

nus-se-bot commented 2 years ago

Team's Response

It doesn't make reasonable sense for anyone to tamper with the data directly from a file, furthermore, the whole purpose of this CLI is to enable users to delete/add what they deem through the CLI. If they can tamper the database, then it really just defeats the whole purpose of the CLI. Throughout this project, it is assumed that the user cannot tamper with the database. In a real work environment, databases are encrypted and you would need certain password etcs to actually edit manually from the database, so this is just unrealistic.

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: Response to team's response:

  1. I didn't see the warning showing that "user cannot change the .txt file manually" in your UG, and I think modifying .txt file is possible user behaviors.
  2. I didn't see any assumption that "assumed that the user cannot tamper with the database" on course website or in your documents
  3. Your database is not encrypted and the third argument is irrelevant.

The key point is that your app should be able to start in any case if it's under the supported environment(with Java11 as shown in your user guide). However, here the app simply cannot restart anymore, which is the worst situation an app can ever have. I argued that it's possible that user will edit the .txt file manually as it's not warned in your user guide. Moreover, it's also possible that the .tar file is under a directory, and there is another directory "data/route.txt" already existing on the path. In that case, users will have no way to open your app. I don't think the illegal data should ever affect running of your app, and your app can simply set the data as default when detecting the illegal data instead of denial of service.

Lastly, the exception message also reflects that there is an unhandled java exception, which is considered poor software engineer practice. Fixing these issues will help improve the robustness and stability of your app significantly.