Skip to content

Commit fea2a8f

Browse files
committed
Updated null salt check and cleaned up test code
1 parent a04bc24 commit fea2a8f

2 files changed

Lines changed: 152 additions & 367 deletions

File tree

src/main/java/com/uid2/operator/service/UIDOperatorService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,9 @@ private byte[] getAdvertisingId(UserIdentity firstLevelHashIdentity, String salt
249249
private byte[] getPreviousAdvertisingId(UserIdentity firstLevelHashIdentity, SaltEntry rotatingSalt, Instant asOf, IdentityEnvironment env) {
250250
long age = asOf.toEpochMilli() - rotatingSalt.lastUpdated();
251251
if (age / DAY_IN_MS < 90) {
252-
boolean missingSalt = rotatingSalt.previousSalt() == null || rotatingSalt.previousSalt().isBlank();
252+
boolean missingSalt = rotatingSalt.previousSalt() == null;
253253
boolean missingKey = rotatingSalt.previousKeySalt() == null
254-
|| rotatingSalt.previousKeySalt().key() == null || rotatingSalt.previousKeySalt().key().isBlank()
255-
|| rotatingSalt.previousKeySalt().salt() == null || rotatingSalt.previousKeySalt().salt().isBlank();
254+
|| rotatingSalt.previousKeySalt().key() == null || rotatingSalt.previousKeySalt().salt() == null;
256255

257256
if (missingSalt && missingKey) {
258257
return null;

0 commit comments

Comments
 (0)