Zjinnnn / pe

0 stars 0 forks source link

[Bug] Duplication Detection (JSON Modification) #3

Open Zjinnnn opened 10 months ago

Zjinnnn commented 10 months ago

image.png

image.png

Bug Description:

Making modifications to friendbook.json can allow bypass of duplication detection if user was not careful. As mentioned in the UG, advanced users can modify the friendbook.json file. However, should an advanced user be careless and accidentally add a space after a name i.e. Tester and there is another contact named Tester, duplication detection will not work. File still loads in, but on GUI, it is virtually impossible to differentiate.

Bug replication:

  1. Modify friendbook.json

Before:

{
  "persons" : [ {
    "name" : "John Doe",
    "phone" : "98321234",
    "email" : "john-local@domain.com",
    "address" : "Thomson Avenue",
    "tags" : [ "Classmat" ]
  }, {
    "name" : "Jane",
    "phone" : "92839102",
    "email" : "jack-ma.tester@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "alphanumeric" ]
  }, {
    "name" : "Tester",
    "phone" : "92839102",
    "email" : "jack.ma1@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ ]
  }, {
    "name" : "Jack Ma Tester",
    "phone" : "92839102",
    "email" : "jack.ma_tester@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "testertestertester" ]
  }, {
    "name" : "Jack Ma Tester 2",
    "phone" : "92839102",
    "email" : "jack.ma_tester2@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "tester2", "tester1", "tester" ]
  }, {
    "name" : "Jack Ma Tester  2",
    "phone" : "92839102",
    "email" : "jack.ma_tester22@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "amafriend", "testertestertester" ]
  }, {
    "name" : "John  Doe",
    "phone" : "98321234",
    "email" : "john-local@domainn.com",
    "address" : "Thomson Avenue",
    "tags" : [ "Classmat" ]
  } ],
  "plans" : [ {
    "planName" : "1",
    "dateTime" : "2024-11-23-10:00",
    "friend" : "John Doe",
    "completionStatus" : false
  }, {
    "planName" : "1",
    "dateTime" : "2024-02-29-10:00",
    "friend" : "John Doe",
    "completionStatus" : false
  } ]
}

After:

{
  "persons" : [ {
    "name" : "John Doe",
    "phone" : "98321234",
    "email" : "john-local@domain.com",
    "address" : "Thomson Avenue",
    "tags" : [ "Classmat" ]
  }, {
    "name" : "Tester ",
    "phone" : "92839102",
    "email" : "jack-ma.tester@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "alphanumeric" ]
  }, {
    "name" : "Tester",
    "phone" : "92839102",
    "email" : "jack.ma1@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ ]
  }, {
    "name" : "Jack Ma Tester",
    "phone" : "92839102",
    "email" : "jack.ma_tester@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "testertestertester" ]
  }, {
    "name" : "Jack Ma Tester 2",
    "phone" : "92839102",
    "email" : "jack.ma_tester2@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "tester2", "tester1", "tester" ]
  }, {
    "name" : "Jack Ma Tester  2",
    "phone" : "92839102",
    "email" : "jack.ma_tester22@yahoo.com",
    "address" : "Sixth Avenue",
    "tags" : [ "amafriend", "testertestertester" ]
  }, {
    "name" : "John  Doe",
    "phone" : "98321234",
    "email" : "john-local@domainn.com",
    "address" : "Thomson Avenue",
    "tags" : [ "Classmat" ]
  } ],
  "plans" : [ {
    "planName" : "1",
    "dateTime" : "2024-11-23-10:00",
    "friend" : "John Doe",
    "completionStatus" : false
  }, {
    "planName" : "1",
    "dateTime" : "2024-02-29-10:00",
    "friend" : "John Doe",
    "completionStatus" : false
  } ]
}
nus-se-script commented 10 months ago

Team's Response

Thank you for your feedback!

In our UG, we stated that if the edits to the JSON file makes the format INVALID. A duplicate field is not considered INVALID format hence, the data will not be deleted.

However, as per CS2103T's severity, a medium severity causes occasional inconvenience. We believe that this will not cause occasional inconvenience as our target audience will not edit the JSON file manually.

Items for the Tester to Verify

:question: Issue severity

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

Reason for disagreement: [replace this with your explanation]