CS2103-AY1819S2-W16-1 / main

UniLA
https://cs2103-ay1819s2-w16-1.github.io/main/
0 stars 1 forks source link

Sanitise inputs #143

Closed nus-se-bot closed 5 years ago

nus-se-bot commented 5 years ago

Different person name can have other same parameters For example, I can add add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 add n/George Tan p/98765432 e/johnd@example.com a/John street, block 123, #01-01 add n/Betty Grace p/98765432 e/johnd@example.com a/John street, block 123, #01-01

Suggested Improvement the person object has many fields. You need to compare each value to check whether it is identical. If it is, I don't think you're suppose to add it.

if(person1.getPhoneNumber == person2.getPhoneNumber) { DoNotAdd(); }

Additional context

ss


Reported by: @jeraldtsy Severity: High

[original: nus-cs2103-AY1819S2/pe-dry-run#139]

jwl1997 commented 5 years ago

actually, we never change this part from the original addressbook4.... and it uses name+phone+email to uniquely identify a person...