From 2489ec00f63d44a996a3cfa4a87c2db88bae6716 Mon Sep 17 00:00:00 2001 From: Robert Ray Martinez III Date: Wed, 20 Jul 2022 17:13:02 -0700 Subject: [PATCH] Rubicon Bid Adapter: Do not send storedrequests (#8717) * do NOT send stored requests! * set to undefined not delete faster? --- modules/rubiconBidAdapter.js | 5 ++++ test/spec/modules/rubiconBidAdapter_spec.js | 27 +++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/modules/rubiconBidAdapter.js b/modules/rubiconBidAdapter.js index c551f8909cf..b08db65a6b6 100644 --- a/modules/rubiconBidAdapter.js +++ b/modules/rubiconBidAdapter.js @@ -320,6 +320,11 @@ export const spec = { // set ext.prebid.auctiontimestamp using auction time deepSetValue(data.imp[0], 'ext.prebid.auctiontimestamp', bidderRequest.auctionStart); + // set storedrequests to undefined so not sent to PBS + // top level and imp level both 'ext.prebid' objects are set above so no exception thrown here + data.ext.prebid.storedrequest = undefined; + data.imp[0].ext.prebid.storedrequest = undefined; + return { method: 'POST', url: `https://${rubiConf.videoHost || 'prebid-server'}.rubiconproject.com/openrtb2/auction`, diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index ebfe6689a3e..fb1b336ef92 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -2139,6 +2139,33 @@ describe('the rubicon adapter', function () { expect(request.data.imp[0].ext.data.pbadslot).to.equal('1234567890'); }); + it('should NOT include storedrequests in pbs payload', function () { + createVideoBidderRequest(); + bidderRequest.bids[0].ortb2 = { + ext: { + prebid: { + storedrequest: 'no-send-top-level-sr' + } + } + } + + bidderRequest.bids[0].ortb2Imp = { + ext: { + prebid: { + storedrequest: 'no-send-imp-sr' + } + } + } + + sandbox.stub(Date, 'now').callsFake(() => + bidderRequest.auctionStart + 100 + ); + + const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest); + expect(request.data.ext.prebid.storedrequest).to.be.undefined; + expect(request.data.imp[0].ext.prebid.storedrequest).to.be.undefined; + }); + it('should include GAM ad unit in bid request', function () { createVideoBidderRequest(); bidderRequest.bids[0].ortb2Imp = {