Type of issue
Bug
Description
Prebid.js can send ext.prebid.data.eidpermissions entries with an empty bidders array to Prebid Server. This happens when an EID source is restricted to a bidder that is only configured client-side (not in the s2s config). Prebid Server validates that each eidpermissions entry has at least one bidder and rejects the entire request if it finds an empty array.
The server-side validation is at auction.go#L1020-L1022:
if len(bidders) == 0 {
return []error{errors.New("request.ext.prebid.data.eidpermissions[].bidders[] required values but was empty")}
}
Root cause
In modules/prebidServerBidAdapter/bidderConfig.js, the replaceEids function filters eidpermissions bidders to only those present in requestedBidders (the s2s bidders). However, after filtering, entries that end up with an empty bidders array are not removed before being sent to PBS.
Reproduction scenario
- Configure bidder-specific EIDs (e.g., EID source
idC restricted to bidderA via ortb2Fragments.bidder)
bidderA is configured for Prebid.js only (client-side), not in the s2s config
bidderB is configured for s2s
- The PBS adapter sends
eidpermissions: [{ source: 'idC', bidders: [] }] to Prebid Server
- Prebid Server rejects the request with:
request.ext.prebid.data.eidpermissions[].bidders[] required values but was empty
Steps to reproduce
- Set up a page with Prebid.js using both client-side and s2s bidders
- Configure a bidder-specific EID (via
setBidderConfig or ortb2Fragments.bidder) for a bidder that is not in the s2s config
- Run an auction — the s2s request to PBS will be rejected
Test page
N/A — reproducible via unit tests.
Expected results
eidpermissions entries with empty bidders arrays should be filtered out before sending the request to Prebid Server. If no valid permissions remain, the eidpermissions field should be omitted entirely.
Actual results
eidpermissions includes entries like { source: 'idC', bidders: [] }, causing Prebid Server to reject the request.
Platform details
- Prebid.js: 11.3.0-pre (current master)
- Affected code:
modules/prebidServerBidAdapter/bidderConfig.js (line 137-141)
Other information
Fix
After filtering permission.bidders to only requested (s2s) bidders, also remove any permission entries where bidders is empty:
consolidated.permissions = consolidated.permissions.filter(p => p.bidders.length > 0);
Type of issue
Bug
Description
Prebid.js can send
ext.prebid.data.eidpermissionsentries with an emptybiddersarray to Prebid Server. This happens when an EID source is restricted to a bidder that is only configured client-side (not in the s2s config). Prebid Server validates that eacheidpermissionsentry has at least one bidder and rejects the entire request if it finds an empty array.The server-side validation is at
auction.go#L1020-L1022:Root cause
In
modules/prebidServerBidAdapter/bidderConfig.js, thereplaceEidsfunction filterseidpermissionsbidders to only those present inrequestedBidders(the s2s bidders). However, after filtering, entries that end up with an emptybiddersarray are not removed before being sent to PBS.Reproduction scenario
idCrestricted tobidderAviaortb2Fragments.bidder)bidderAis configured for Prebid.js only (client-side), not in the s2s configbidderBis configured for s2seidpermissions: [{ source: 'idC', bidders: [] }]to Prebid Serverrequest.ext.prebid.data.eidpermissions[].bidders[] required values but was emptySteps to reproduce
setBidderConfigorortb2Fragments.bidder) for a bidder that is not in the s2s configTest page
N/A — reproducible via unit tests.
Expected results
eidpermissionsentries with emptybiddersarrays should be filtered out before sending the request to Prebid Server. If no valid permissions remain, theeidpermissionsfield should be omitted entirely.Actual results
eidpermissionsincludes entries like{ source: 'idC', bidders: [] }, causing Prebid Server to reject the request.Platform details
modules/prebidServerBidAdapter/bidderConfig.js(line 137-141)Other information
Fix
After filtering
permission.biddersto only requested (s2s) bidders, also remove any permission entries wherebiddersis empty: