Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBJS Core: canBidderRegisterSync ignoring iframe sync disabled by default #6535

Merged
merged 15 commits into from
Apr 7, 2021
2 changes: 1 addition & 1 deletion src/userSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function newUserSync(userSyncDependencies) {
}
return checkForFiltering[filterType](biddersToFilter, bidder);
}
return false;
return !permittedPixels[type];
}

/**
Expand Down
18 changes: 18 additions & 0 deletions test/spec/userSync_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,24 @@ describe('user sync', function () {
});
expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false);
});
it('should return false for iframe if there is no iframe filterSettings', function () {
const userSync = newUserSync({
config: {
syncEnabled: true,
filterSettings: {
image: {
bidders: '*',
filter: 'include'
}
},
syncsPerBidder: 5,
syncDelay: 3000,
auctionDelay: 0
}
});

expect(userSync.canBidderRegisterSync('iframe', 'otherTestBidder')).to.equal(false);
});
it('should return true if filter settings does allow it', function () {
const userSync = newUserSync({
config: {
Expand Down