nus-cs2103-AY1920S1 / pe-dev-response

0 stars 0 forks source link

Invalid URL can be added with add command #1537

Open nus-pe-bot opened 4 years ago

nus-pe-bot commented 4 years ago

Summary: An invalid URL can be added as a bookmark. Eg. "https://monkey" "https://google"

Steps to reproduce:

  1. type "add n/monkeys u/https://google r/Module planner t/school t/timetable

Expected results: Throw invalid url error because the url is invalid.

Actual results: Result displays show success message: "New bookmark added: monkeys URL: https://google Remark: Module planner Folder: ROOT Tags: [school][timetable]"

Screenshot of issue:

Screenshot 2019-11-15 at 5.09.10 PM.png


[original: nus-cs2103-AY1920S1/pe-interim#1546]

dorcastan commented 4 years ago

Team's Response

Thanks for the report.

The User Guide defines a valid URL as follows:

Screenshot 2019-11-17 at 3.29.03 PM.png

(This description can also be viewed in the application when an invalid URL is entered.)

Our definition of a valid URL is based on the URI generic syntax. We chose to make our URL validation more lenient by allowing some invalid URLs instead of potentially rejecting valid URLs (which would negatively impact the app's usefulness). Validating URLs perfectly would require the app to actually check whether a web page exists at the given address, which greatly diminishes performance; the check might also fail in some cases (e.g. too many redirects).

We acknowledge that the validation is imperfect. However, because it is impossible to validate URLs perfectly, we are marking this bug as out of scope for this CS2103T project. In other words, we believe that this is a valid issue but not one that the team should be penalized for.

Duplicate status (if any):

--