Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions modules/cadent_aperture_mxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
let sizes;
bid.mediaTypes && bid.mediaTypes.banner && bid.mediaTypes.banner.sizes ? sizes = bid.mediaTypes.banner.sizes : sizes = bid.sizes;
if (!cadentAdapter.validateSizes(sizes)) {
logWarn(BIDDER_CODE + ': could not detect mediaType banner sizes. Assigning to bid sizes instead');
sizes = bid.sizes;

Check warning on line 51 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

50-51 lines are not covered with tests
}
return {
format: sizes.map((size) => {
Expand Down Expand Up @@ -94,22 +94,22 @@
cleanProtocols: (video) => {
if (video.protocols && video.protocols.includes(7)) {
// not supporting VAST protocol 7 (VAST 4.0);
logWarn(BIDDER_CODE + ': VAST 4.0 is currently not supported. This protocol has been filtered out of the request.');
video.protocols = video.protocols.filter(protocol => protocol !== 7);

Check warning on line 98 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

97-98 lines are not covered with tests
}
return video;
},
outstreamRender: (bid) => {
bid.renderer.push(function () {
const params = (bid && bid.params && bid.params[0] && bid.params[0].video) ? bid.params[0].video : {};
window.emxVideoQueue = window.emxVideoQueue || [];
window.queueEmxVideo({

Check warning on line 106 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

103-106 lines are not covered with tests
id: bid.adUnitCode,
adsResponses: bid.vastXml,
options: params
});
if (window.emxVideoReady && window.videojs) {
window.emxVideoReady();

Check warning on line 112 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

111-112 lines are not covered with tests
}
});
},
Expand All @@ -122,7 +122,7 @@
try {
renderer.setRender(cadentAdapter.outstreamRender);
} catch (err) {
logWarn('Prebid Error calling setRender on renderer', err);

Check warning on line 125 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

125 line is not covered with tests
}

return renderer;
Expand All @@ -134,8 +134,8 @@
videoObj['w'] = bid.mediaTypes.video.playerSize[0][0];
videoObj['h'] = bid.mediaTypes.video.playerSize[0][1];
} else {
videoObj['w'] = bid.mediaTypes.video.playerSize[0];
videoObj['h'] = bid.mediaTypes.video.playerSize[1];

Check warning on line 138 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

137-138 lines are not covered with tests
}
return cadentAdapter.cleanProtocols(videoObj);
},
Expand All @@ -143,7 +143,7 @@
try {
return decodeURIComponent(bidResponseAdm.replace(/%(?![0-9][0-9a-fA-F]+)/g, '%25'));
} catch (err) {
logError('cadent_aperture_mxBidAdapter', 'error', err);

Check warning on line 146 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

146 line is not covered with tests
}
},
getSite: (refInfo) => {
Expand Down Expand Up @@ -177,8 +177,8 @@
if (bidRequest.gppConsent) {
const { gppString: gpp, applicableSections: gppSid } = bidRequest.gppConsent;
if (cadentData.regs) {
cadentData.regs.gpp = gpp;
cadentData.regs.gpp_sid = gppSid;

Check warning on line 181 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

180-181 lines are not covered with tests
} else {
cadentData.regs = {
gpp: gpp,
Expand All @@ -201,14 +201,16 @@
return cadentData;
},
// supporting eids
getEids(bidRequests) {
// Prebid 10+ provides user IDs only as EIDs (ortb2.user.ext.eids / bid.userIdAsEids)
getEids(bidderRequest) {
const eids = bidderRequest?.ortb2?.user?.ext?.eids || bidderRequest?.bids?.[0]?.userIdAsEids || [];
return EIDS_SUPPORTED
.map(cadentAdapter.getUserId(bidRequests))
.map(cadentAdapter.getUserId(eids))
.filter(x => x);
},
getUserId(bidRequests) {
return ({ key, source, rtiPartner }) => {
const id = deepAccess(bidRequests, `userId.${key}`);
getUserId(eids) {
return ({ source, rtiPartner }) => {
const id = eids.find(eid => eid?.source === source)?.uids?.[0]?.id;
return id ? cadentAdapter.formatEid(id, source, rtiPartner) : null;
};
},
Expand Down Expand Up @@ -253,8 +255,8 @@
}

if (!bid.mediaTypes.video.playerSize) {
logWarn(BIDDER_CODE + ': Missing video playerSize');
return false;

Check warning on line 259 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

258-259 lines are not covered with tests
}
}

Expand Down Expand Up @@ -311,16 +313,14 @@
}

// adding eid support
if (bidderRequest.userId) {
const eids = cadentAdapter.getEids(bidderRequest);
if (eids.length > 0) {
if (cadentData.user && cadentData.user.ext) {
cadentData.user.ext.eids = eids;
} else {
cadentData.user = {
ext: { eids }
};
}
const eids = cadentAdapter.getEids(bidderRequest);
if (eids.length > 0) {
if (cadentData.user && cadentData.user.ext) {
cadentData.user.ext.eids = eids;

Check warning on line 319 in modules/cadent_aperture_mxBidAdapter.js

View workflow job for this annotation

GitHub Actions / Coverage

319 line is not covered with tests
} else {
cadentData.user = {
ext: { eids }
};
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/nexverseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function buildOpenRtbRequest(bid, bidderRequest) {
},
user: {
id: getUid(storage),
buyeruid: bidderRequest.userId || '', // User ID or Buyer ID
buyeruid: bidderRequest.ortb2?.user?.buyeruid || '', // Buyer ID from first party data
yob,
gender,
keywords,
Expand Down
6 changes: 3 additions & 3 deletions modules/pangleBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function createRequest(bidRequests, bidderRequest, mediaType) {
});
const devicetype = spec.getDeviceType(navigator.userAgent);
deepSetValue(data, 'device.devicetype', devicetype);
if (bidderRequest.userId && typeof bidderRequest.userId === 'object') {
// add the pangle cookie alongside user IDs (Prebid 10+ provides them only as EIDs)
const _eids = data.user?.ext?.eids ?? [];
if (_eids.length > 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Register Pangle as a bidder before activating cookie access

🤖 This comment was written by an AI agent (GPT-6.1 Sol) on behalf of the review requester.

When EIDs are present and bidderSettings.pangle.storageAllowed is unset or explicitly false, this newly reachable path still reads and writes _pangle_id unless another activity control blocks it. The existing storage manager uses MODULE_TYPE_RTD, while storageAllowedRule in src/storageManager.ts:344-355 checks permission only for bidder components. I reproduced the cookie write with storageAllowed: false; the parent revision does not write it. Construct the manager with bidderCode: BIDDER_CODE before enabling this path, and cover the storage opt-out in tests.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This comment was written by an AI agent (Claude Code) on behalf of @patmmccann.

Agreed. Turning this path on would start cookie reads and writes that aren't covered by storageAllowed (the storage manager is registered as an RTD module) and that have no disclosure. dbe56a5 doesn't enable it. It removes the dead block, which was gated on bidderRequest.userId, along with the _pangle_id cookie helpers, so pangle's payload and storage behavior stay as they are on master. If the adapter maintainers want this ID back, they can add it with a bidder storage manager and a disclosure.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Publish a disclosure for the newly enabled Pangle cookie

🤖 This comment was written by an AI agent (GPT-6.1 Sol) on behalf of the review requester.

For publishers that allow Pangle cookie storage and include storageControl with its default strict policy, this newly enabled cookie cannot persist. A repository-wide search for _pangle_id finds only the adapter and its test, and Pangle's generated metadata has no disclosure URL or storage disclosures. Consequently, storageControlRule rejects the cookie reads and writes even after correcting the manager's component type, leaving getPangleCookieId() to generate a fresh UUID for every impression. Declare a source disclosure and its URL on the adapter, rather than hand-editing generated metadata, and document the cookie's use.

AGENTS.md reference: AGENTS.md:L129-L129

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This comment was written by an AI agent (Claude Code) on behalf of @patmmccann.

Agreed. Turning this path on would start cookie reads and writes that aren't covered by storageAllowed (the storage manager is registered as an RTD module) and that have no disclosure. dbe56a5 doesn't enable it. It removes the dead block, which was gated on bidderRequest.userId, along with the _pangle_id cookie helpers, so pangle's payload and storage behavior stay as they are on master. If the adapter maintainers want this ID back, they can add it with a bidder storage manager and a disclosure.

const pangleId = getPangleCookieId();
// add pangle cookie
const _eids = data.user?.ext?.eids ?? [];
deepSetValue(data, 'user.ext.eids', [
..._eids,
{
Expand Down
12 changes: 10 additions & 2 deletions test/spec/modules/cadent_aperture_mxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ describe('cadent_aperture_mx Adapter', function () {
it('should add liveramp identitylink id to request', () => {
const idl_env = '123';
const bidRequestWithID = utils.deepClone(bidderRequest);
bidRequestWithID.userId = { idl_env };
bidRequestWithID.ortb2 = { user: { ext: { eids: [{ source: 'liveramp.com', uids: [{ id: idl_env, atype: 3 }] }] } } };
let requestWithID = spec.buildRequests(bidRequestWithID.bids, bidRequestWithID);
requestWithID = JSON.parse(requestWithID.data);
expect(requestWithID.user.ext.eids[0]).to.deep.equal({
Expand Down Expand Up @@ -449,7 +449,7 @@ describe('cadent_aperture_mx Adapter', function () {
it('should add UID 2.0 to request', () => {
const uid2 = { id: '456' };
const bidRequestWithUID = utils.deepClone(bidderRequest);
bidRequestWithUID.userId = { uid2 };
bidRequestWithUID.bids = bidRequestWithUID.bids.map(bid => ({ ...bid, userIdAsEids: [{ source: 'uidapi.com', uids: [{ id: uid2.id, atype: 3 }] }] }));
let requestWithUID = spec.buildRequests(bidRequestWithUID.bids, bidRequestWithUID);
requestWithUID = JSON.parse(requestWithUID.data);
expect(requestWithUID.user.ext.eids[0]).to.deep.equal({
Expand All @@ -462,6 +462,14 @@ describe('cadent_aperture_mx Adapter', function () {
}]
});
});

it('should only send supported EID sources', () => {
const bidRequestWithEids = utils.deepClone(bidderRequest);
bidRequestWithEids.ortb2 = { user: { ext: { eids: [{ source: 'example.com', uids: [{ id: 'other', atype: 1 }] }] } } };
let request = spec.buildRequests(bidRequestWithEids.bids, bidRequestWithEids);
request = JSON.parse(request.data);
expect(request.user?.ext?.eids).to.equal(undefined);
});
});

describe('gpp tests', function() {
Expand Down
28 changes: 28 additions & 0 deletions test/spec/modules/nexverseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ import { getOsVersion } from '../../../libraries/advangUtils/index.js';
const BIDDER_ENDPOINT = 'https://rtb.nexverse.ai';

describe('nexverseBidAdapterTests', () => {
describe('buildRequests: user.buyeruid', function () {
const bid = {
bidId: 'bid-1',
adUnitCode: 'div-nexverse-test',
bidder: 'nexverse',
params: { uid: '77d4a2eb3d209ce6c7691dc79fcab358', pubId: '24051', pubEpid: '34561' },
mediaTypes: { banner: { sizes: [[300, 250]] } },
sizes: [[300, 250]],
};
const baseBidderRequest = {
auctionId: 'auction-1',
refererInfo: { page: 'https://example.com/page', domain: 'example.com', ref: '' },
};

function buyeruidFor(bidderRequest) {
const [request] = spec.buildRequests([bid], bidderRequest);
return JSON.parse(request.data).user.buyeruid;
}

it('should send ortb2.user.buyeruid as user.buyeruid', function () {
expect(buyeruidFor({ ...baseBidderRequest, ortb2: { user: { buyeruid: 'buyer-123' } } })).to.equal('buyer-123');
});

it('should send an empty user.buyeruid when no buyeruid is provided', function () {
expect(buyeruidFor(baseBidderRequest)).to.equal('');
});
});

describe('getUserSyncs', () => {
it('includes configured COPPA in the sync URL', () => {
const [sync] = spec.getUserSyncs({ pixelEnabled: true }, [], null, null, null, true);
Expand Down
37 changes: 26 additions & 11 deletions test/spec/modules/pangleBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@ const REQUEST = [{
}];

const DEFAULT_OPTIONS = {
userId: {
britepoolid: 'pangle-britepool',
criteoId: 'pangle-criteo',
digitrustid: { data: { id: 'pangle-digitrust' } },
id5id: { uid: 'pangle-id5' },
idl_env: 'pangle-idl-env',
lipb: { lipbid: 'pangle-liveintent' },
netId: 'pangle-netid',
parrableId: { eid: 'pangle-parrable' },
pubcid: 'pangle-pubcid',
tdid: 'pangle-ttd',
ortb2: {
user: {
ext: {
eids: [
{ source: 'criteo.com', uids: [{ id: 'pangle-criteo', atype: 1 }] },
{ source: 'pubcid.org', uids: [{ id: 'pangle-pubcid', atype: 1 }] },
]
}
}
}
};

Expand Down Expand Up @@ -137,6 +135,23 @@ describe('pangle bid adapter', function () {
const payload2 = request2.data;
expect(payload2.imp[0]).to.have.property('id', REQUEST[1].bidId);
});

afterEach(function () {
document.cookie = '_pangle_id=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
});

it('appends the pangle id EID when user ID EIDs are present', function () {
const payload = spec.buildRequests(REQUEST, DEFAULT_OPTIONS)[0].data;
const eids = payload.user.ext.eids;
expect(eids.map(eid => eid.source)).to.deep.equal(['criteo.com', 'pubcid.org', document.location.host]);
expect(eids[2].uids[0].atype).to.equal(1);
expect(eids[2].uids[0].id).to.be.a('string').and.not.be.empty;
});

it('does not add the pangle id EID when there are no user ID EIDs', function () {
const payload = spec.buildRequests(REQUEST, {})[0].data;
expect(payload.user?.ext?.eids).to.equal(undefined);
});
});

describe('interpretResponse', function () {
Expand Down
Loading