From d81957dc85f25768c97855212b91e030546e0667 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Mon, 16 Nov 2026 18:25:31 -0500 Subject: [PATCH 1/3] Cadent, Pangle, Nexverse Bid Adapters: stop gating on bidderRequest.userId bidderRequest.userId is never set (bids had userId before Prebid 10.0, bidder requests never did; #13253 removed it from bids), so these paths never ran: - cadent_aperture_mx: send the liveramp.com and uidapi.com EIDs it was written to send, read from ortb2.user.ext.eids / bid.userIdAsEids - pangle: append its _pangle_id EID when the request carries user ID EIDs - nexverse: fill user.buyeruid from ortb2.user.buyeruid Co-Authored-By: Claude Opus 5.5 --- modules/cadent_aperture_mxBidAdapter.js | 30 +++++++-------- modules/nexverseBidAdapter.js | 2 +- modules/pangleBidAdapter.js | 6 +-- .../cadent_aperture_mxBidAdapter_spec.js | 12 +++++- test/spec/modules/nexverseBidAdapter_spec.js | 28 ++++++++++++++ test/spec/modules/pangleBidAdapter_spec.js | 37 +++++++++++++------ 6 files changed, 83 insertions(+), 32 deletions(-) diff --git a/modules/cadent_aperture_mxBidAdapter.js b/modules/cadent_aperture_mxBidAdapter.js index e2c6ceecac0..dcebd62d9c9 100644 --- a/modules/cadent_aperture_mxBidAdapter.js +++ b/modules/cadent_aperture_mxBidAdapter.js @@ -201,14 +201,16 @@ export const cadentAdapter = { 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; }; }, @@ -311,16 +313,14 @@ export const spec = { } // 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; + } else { + cadentData.user = { + ext: { eids } + }; } } diff --git a/modules/nexverseBidAdapter.js b/modules/nexverseBidAdapter.js index 565dc34884a..0f47ad43478 100644 --- a/modules/nexverseBidAdapter.js +++ b/modules/nexverseBidAdapter.js @@ -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, diff --git a/modules/pangleBidAdapter.js b/modules/pangleBidAdapter.js index f53e078f49b..ecb10451872 100644 --- a/modules/pangleBidAdapter.js +++ b/modules/pangleBidAdapter.js @@ -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) { const pangleId = getPangleCookieId(); - // add pangle cookie - const _eids = data.user?.ext?.eids ?? []; deepSetValue(data, 'user.ext.eids', [ ..._eids, { diff --git a/test/spec/modules/cadent_aperture_mxBidAdapter_spec.js b/test/spec/modules/cadent_aperture_mxBidAdapter_spec.js index 3e5eb6af926..2ef68f90069 100644 --- a/test/spec/modules/cadent_aperture_mxBidAdapter_spec.js +++ b/test/spec/modules/cadent_aperture_mxBidAdapter_spec.js @@ -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({ @@ -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({ @@ -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() { diff --git a/test/spec/modules/nexverseBidAdapter_spec.js b/test/spec/modules/nexverseBidAdapter_spec.js index 63ab8330ffc..5ef02452436 100644 --- a/test/spec/modules/nexverseBidAdapter_spec.js +++ b/test/spec/modules/nexverseBidAdapter_spec.js @@ -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); diff --git a/test/spec/modules/pangleBidAdapter_spec.js b/test/spec/modules/pangleBidAdapter_spec.js index f3f04efdbd8..457c701626b 100644 --- a/test/spec/modules/pangleBidAdapter_spec.js +++ b/test/spec/modules/pangleBidAdapter_spec.js @@ -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 }] }, + ] + } + } } }; @@ -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 () { From dbe56a59cadd71f4ab7e0803c1c03fa91faea533 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Mon, 16 Nov 2026 18:49:34 -0500 Subject: [PATCH 2/3] Pangle Bid Adapter: drop the dead _pangle_id EID path instead of enabling it Enabling the _pangle_id cookie EID would start reading/writing a first-party cookie through a storage manager registered as an RTD module (so bidderSettings.pangle.storageAllowed doesn't apply) and with no storage disclosure. Keep today's behavior instead: remove the block that was gated on the never-set bidderRequest.userId, plus its cookie helpers. Co-Authored-By: Claude Opus 5.5 --- modules/pangleBidAdapter.js | 40 +--------------------- test/spec/modules/pangleBidAdapter_spec.js | 15 +++----- 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/modules/pangleBidAdapter.js b/modules/pangleBidAdapter.js index ecb10451872..a18af64750a 100644 --- a/modules/pangleBidAdapter.js +++ b/modules/pangleBidAdapter.js @@ -1,7 +1,7 @@ import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { ortbConverter } from '../libraries/ortbConverter/converter.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import { deepSetValue, generateUUID, timestamp, deepAccess } from '../src/utils.js'; +import { deepSetValue, deepAccess } from '../src/utils.js'; import { getStorageManager } from '../src/storageManager.js'; import { MODULE_TYPE_RTD } from '../src/activities/modules.js'; @@ -15,8 +15,6 @@ const OUTSTREAM_RENDERER_URL = 'https://sf16-static.i18n-pglstatp.com/obj/ad-pat const DEFAULT_BID_TTL = 30; const DEFAULT_CURRENCY = 'USD'; const DEFAULT_NET_REVENUE = true; -const PANGLE_COOKIE = '_pangle_id'; -const COOKIE_EXP = 86400 * 1000 * 365 * 1; // 1 year const MEDIA_TYPES = { Banner: 1, Video: 2 @@ -30,25 +28,6 @@ export function isValidUuid(uuid) { ); } -function getPangleCookieId() { - let sid = storage.cookiesAreEnabled() && storage.getCookie(PANGLE_COOKIE); - - if (!sid || !isValidUuid(sid)) { - sid = generateUUID(); - setPangleCookieId(sid); - } - - return sid; -} - -function setPangleCookieId(sid) { - if (storage.cookiesAreEnabled()) { - const expires = new Date(timestamp() + COOKIE_EXP).toGMTString(); - - storage.setCookie(PANGLE_COOKIE, sid, expires); - } -} - function createRequest(bidRequests, bidderRequest, mediaType) { const data = converter.toORTB({ bidRequests, @@ -57,23 +36,6 @@ function createRequest(bidRequests, bidderRequest, mediaType) { }); const devicetype = spec.getDeviceType(navigator.userAgent); deepSetValue(data, 'device.devicetype', devicetype); - // add the pangle cookie alongside user IDs (Prebid 10+ provides them only as EIDs) - const _eids = data.user?.ext?.eids ?? []; - if (_eids.length > 0) { - const pangleId = getPangleCookieId(); - deepSetValue(data, 'user.ext.eids', [ - ..._eids, - { - source: document.location.host, - uids: [ - { - id: pangleId, - atype: 1, - }, - ], - }, - ]); - } bidRequests.forEach((item, idx) => { deepSetValue(data.imp[idx], 'ext.networkids', item.params); deepSetValue(data.imp[idx], 'banner.api', [5]); diff --git a/test/spec/modules/pangleBidAdapter_spec.js b/test/spec/modules/pangleBidAdapter_spec.js index 457c701626b..1a0f8a897d8 100644 --- a/test/spec/modules/pangleBidAdapter_spec.js +++ b/test/spec/modules/pangleBidAdapter_spec.js @@ -136,20 +136,13 @@ describe('pangle bid adapter', function () { 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 () { + it('passes user ID EIDs through without adding a pangle id EID', 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; + expect(payload.user.ext.eids).to.deep.equal(DEFAULT_OPTIONS.ortb2.user.ext.eids); }); - it('does not add the pangle id EID when there are no user ID EIDs', function () { - const payload = spec.buildRequests(REQUEST, {})[0].data; + it('does not add a pangle id EID for a raw bidderRequest.userId', function () { + const payload = spec.buildRequests(REQUEST, { userId: { pubcid: 'raw' } })[0].data; expect(payload.user?.ext?.eids).to.equal(undefined); }); }); From 65a7219700de112ecd0c34d78055cd034fc5d80b Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 25 Nov 2026 13:03:45 -0500 Subject: [PATCH 3/3] Nexverse Bid Adapter: read buyeruid from ortb2 in master's new user test The test added on master set bidderRequest.userId, which core never sets and this PR stops reading. Co-Authored-By: Claude Opus 5.5 --- test/spec/modules/nexverseBidAdapter_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/modules/nexverseBidAdapter_spec.js b/test/spec/modules/nexverseBidAdapter_spec.js index 5790ae7c69a..1573a7bd9df 100644 --- a/test/spec/modules/nexverseBidAdapter_spec.js +++ b/test/spec/modules/nexverseBidAdapter_spec.js @@ -139,7 +139,7 @@ describe('nexverseBidAdapterTests', () => { it('includes user demographics, consent, referrer, and app details', () => { Object.assign(bid.params, { yob: '1980', gender: 'F', keywords: 'news', geoLat: 10, geoLon: 20 }); Object.assign(bidderRequest, { - userId: 'buyer-user', + ortb2: { user: { buyeruid: 'buyer-user' } }, gdprConsent: { gdprApplies: true, consentString: 'gdpr-consent' }, uspConsent: '1YNN', app: { id: 'app-1', name: 'Example', bundle: 'example.app', domain: 'app.example', storeUrl: 'https://store.example/app', cat: ['IAB1'] }