Fix typo that caused some invalid ContactRecords to slip through.

We were doing .equals() between an ACI and a UUID, so it was always
returning false. Fixed by swithing to the proper check.
This commit is contained in:
Greyson Parrelli 2021-12-02 09:54:04 -05:00
parent 6154ff36c1
commit 88aa67b847

View file

@ -51,7 +51,7 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
if (address == null) {
Log.w(TAG, "No address on the ContentRecord -- marking as invalid.");
return true;
} else if (address.getAci().equals(UuidUtil.UNKNOWN_UUID)) {
} else if (!address.hasValidAci()) {
Log.w(TAG, "Found a ContactRecord without a UUID -- marking as invalid.");
return true;
} else if ((self.getAci().isPresent() && address.getAci().equals(self.requireAci())) ||