Validate that reporting token is non-null and non-empty.

This commit is contained in:
Greyson Parrelli 2023-02-22 10:33:56 -05:00
parent 316df00287
commit 3ebafca297

View file

@ -119,7 +119,7 @@ public final class PushDecryptMessageJob extends BaseJob {
Log.w(TAG, "Ignoring PNI signature because the feature flag is disabled!"); Log.w(TAG, "Ignoring PNI signature because the feature flag is disabled!");
} }
if (envelope.hasReportingToken()) { if (envelope.hasReportingToken() && envelope.getReportingToken() != null && envelope.getReportingToken().length > 0) {
SignalDatabase.recipients().setReportingToken(RecipientId.from(result.getContent().getSender()), envelope.getReportingToken()); SignalDatabase.recipients().setReportingToken(RecipientId.from(result.getContent().getSender()), envelope.getReportingToken());
} }