From f9848bda9763cbe44a8a9f24d940431afe810009 Mon Sep 17 00:00:00 2001 From: dpiwko Date: Tue, 14 Jul 2026 16:05:26 +0200 Subject: [PATCH 1/3] adshield --- modules/dasBidAdapter.js | 10 ++++++++++ modules/ringieraxelspringerBidAdapter.js | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/dasBidAdapter.js b/modules/dasBidAdapter.js index 53b0ee92033..84f35e3faea 100644 --- a/modules/dasBidAdapter.js +++ b/modules/dasBidAdapter.js @@ -147,6 +147,12 @@ function parseParams(params, bidderRequest) { customParams.dsainfo = dsaRequired; } + // AdShield anti-adblock recovery signal (set by dlApi as customParams.asd, like adbeta). + // Routed into ext.keyvalues so das-bidder serves only adblock_compability == 2 demand. + if (customParams.asd !== undefined) { + keyValues.asd = customParams.asd; + } + return { customParams, keyValues, @@ -364,6 +370,10 @@ export const spec = { const baseUrl = getEndpoint(data.ext.network); const fullUrl = `${baseUrl}?data=${encodeURIComponent(jsonData)}`; + const queryParams = Object.fromEntries(new URL(fullUrl).searchParams.entries()); + // eslint-disable-next-line no-console + console.log('[das] CSR request:', { url: baseUrl, fullUrl, data: jsonData, queryParams }); + // adbeta needs credentials omitted to avoid CORS issues, especially in Firefox const useCredentials = !data.ext?.adbeta; diff --git a/modules/ringieraxelspringerBidAdapter.js b/modules/ringieraxelspringerBidAdapter.js index aa9c73e970b..48fa8e82873 100644 --- a/modules/ringieraxelspringerBidAdapter.js +++ b/modules/ringieraxelspringerBidAdapter.js @@ -341,9 +341,13 @@ export const spec = { mediaType: (bid.mediaTypes && bid.mediaTypes.banner) ? 'display' : NATIVE })); + const url = getEndpoint(network) + contextQuery + slotsQuery + gdprQuery; + // eslint-disable-next-line no-console + console.log('[ringieraxelspringer] CSR request:', url); + return [{ method: 'GET', - url: getEndpoint(network) + contextQuery + slotsQuery + gdprQuery, + url, bidIds: bidIds }]; }, From d7a068758b45c44e12a78f8489683638f3a41647 Mon Sep 17 00:00:00 2001 From: dpiwko Date: Wed, 15 Jul 2026 12:13:22 +0200 Subject: [PATCH 2/3] adshield --- modules/dasBidAdapter.js | 10 ---------- modules/ringieraxelspringerBidAdapter.js | 6 +----- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/dasBidAdapter.js b/modules/dasBidAdapter.js index 84f35e3faea..53b0ee92033 100644 --- a/modules/dasBidAdapter.js +++ b/modules/dasBidAdapter.js @@ -147,12 +147,6 @@ function parseParams(params, bidderRequest) { customParams.dsainfo = dsaRequired; } - // AdShield anti-adblock recovery signal (set by dlApi as customParams.asd, like adbeta). - // Routed into ext.keyvalues so das-bidder serves only adblock_compability == 2 demand. - if (customParams.asd !== undefined) { - keyValues.asd = customParams.asd; - } - return { customParams, keyValues, @@ -370,10 +364,6 @@ export const spec = { const baseUrl = getEndpoint(data.ext.network); const fullUrl = `${baseUrl}?data=${encodeURIComponent(jsonData)}`; - const queryParams = Object.fromEntries(new URL(fullUrl).searchParams.entries()); - // eslint-disable-next-line no-console - console.log('[das] CSR request:', { url: baseUrl, fullUrl, data: jsonData, queryParams }); - // adbeta needs credentials omitted to avoid CORS issues, especially in Firefox const useCredentials = !data.ext?.adbeta; diff --git a/modules/ringieraxelspringerBidAdapter.js b/modules/ringieraxelspringerBidAdapter.js index 48fa8e82873..aa9c73e970b 100644 --- a/modules/ringieraxelspringerBidAdapter.js +++ b/modules/ringieraxelspringerBidAdapter.js @@ -341,13 +341,9 @@ export const spec = { mediaType: (bid.mediaTypes && bid.mediaTypes.banner) ? 'display' : NATIVE })); - const url = getEndpoint(network) + contextQuery + slotsQuery + gdprQuery; - // eslint-disable-next-line no-console - console.log('[ringieraxelspringer] CSR request:', url); - return [{ method: 'GET', - url, + url: getEndpoint(network) + contextQuery + slotsQuery + gdprQuery, bidIds: bidIds }]; }, From 371d1a33d9e671af07088f336385af148b715505 Mon Sep 17 00:00:00 2001 From: dpiwko Date: Mon, 12 Oct 2026 13:01:59 +0200 Subject: [PATCH 3/3] adf DAS --- modules/dasBidAdapter.js | 13 ++++-- test/spec/modules/dasBidAdapter_spec.js | 62 ++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 6 deletions(-) diff --git a/modules/dasBidAdapter.js b/modules/dasBidAdapter.js index 53b0ee92033..81f31be99c8 100644 --- a/modules/dasBidAdapter.js +++ b/modules/dasBidAdapter.js @@ -248,11 +248,14 @@ function buildOpenRTBRequest(bidRequests, bidderRequest) { request.ext.adbeta = customParams.adbeta; } - // AdShield anti-adblock recovery signal (set by dlApi as customParams.asd, like adbeta). - // Sent as a plain ext field (not a key-value) so das-bidder serves only - // adblock-compatible demand (adblock_compability == 2). - if (customParams.asd) { - request.ext.asd = customParams.asd; + const adf = parseInt(customParams.adf, 10); + if (Number.isInteger(adf) && adf > 0) { + request.ext.adf = adf; + } + + const asd = parseInt(customParams.asd, 10); + if (Number.isInteger(asd) && asd > 0) { + request.ext.asd = asd; } if (bidderRequest.device) { diff --git a/test/spec/modules/dasBidAdapter_spec.js b/test/spec/modules/dasBidAdapter_spec.js index d8252171945..a18a2a3b9cb 100644 --- a/test/spec/modules/dasBidAdapter_spec.js +++ b/test/spec/modules/dasBidAdapter_spec.js @@ -179,7 +179,7 @@ describe('dasBidAdapter', function () { expect(payload.imp[0].banner.format[0]).to.deep.equal({ w: 300, h: 250 }); }); - it('should route customParams.asd into ext.asd for AdShield recovery', function () { + it('should route customParams.asd into ext.asd as an integer', function () { const asdBidRequests = [{ ...bidRequests[0], params: { @@ -204,6 +204,66 @@ describe('dasBidAdapter', function () { expect(payload.ext.asd).to.be.undefined; }); + it('should route customParams.adf into ext.adf as an integer', function () { + const adfBidRequests = [{ + ...bidRequests[0], + params: { + ...bidRequests[0].params, + customParams: { adf: 1 } + } + }]; + + const request = spec.buildRequests(adfBidRequests, bidderRequest); + const params = new URLSearchParams(request.url.split('?')[1]); + const payload = JSON.parse(decodeURIComponent(params.get('data'))); + + expect(payload.ext.adf).to.equal(1); + expect(payload.ext.asd).to.be.undefined; + expect(payload.ext.keyvalues.adf).to.be.undefined; + }); + + it('should not set ext.adf without customParams.adf', function () { + const request = spec.buildRequests(bidRequests, bidderRequest); + const params = new URLSearchParams(request.url.split('?')[1]); + const payload = JSON.parse(decodeURIComponent(params.get('data'))); + + expect(payload.ext.adf).to.be.undefined; + }); + + it('should coerce string customParams.adf and customParams.asd to integers', function () { + const stringBidRequests = [{ + ...bidRequests[0], + params: { + ...bidRequests[0].params, + customParams: { adf: '1', asd: '1' } + } + }]; + + const request = spec.buildRequests(stringBidRequests, bidderRequest); + const params = new URLSearchParams(request.url.split('?')[1]); + const payload = JSON.parse(decodeURIComponent(params.get('data'))); + + expect(payload.ext.adf).to.equal(1); + expect(payload.ext.asd).to.equal(1); + }); + + it('should drop non-numeric or zero customParams.adf and customParams.asd', function () { + const badBidRequests = [{ + ...bidRequests[0], + params: { + ...bidRequests[0].params, + customParams: { adf: 'yes', asd: 0 } + } + }]; + + const request = spec.buildRequests(badBidRequests, bidderRequest); + const params = new URLSearchParams(request.url.split('?')[1]); + const payload = JSON.parse(decodeURIComponent(params.get('data'))); + + expect(payload.ext.adf).to.be.undefined; + expect(payload.ext.asd).to.be.undefined; + }); + it('should use GET method when URL is under 8192 characters', function () { const request = spec.buildRequests(bidRequests, bidderRequest); expect(request.method).to.equal('GET');