Skip to content

ID5 - Infinite EID duplication #13852

@Sir-Will

Description

@Sir-Will

In Prebid version 9.31.0 the ID5 module was updated which introduced an issue when using it in the combination with pubProvidedId.

In the case of the id5IdSystem and pubProvidedId providing a ID5 eid, every internal or external pbjs.getUserIdsAsEids() call is duplicating the ID5 eids from pubProvidedId, resulting in it duplicating itself on every auction.

During the troubleshooting, I tracked down the issue to the following:

  1. The ID5 module change introduces a function which returns an object reference: https://github.com/prebid/Prebid.js/pull/12745/files#diff-403b8e4d08d347eac6d6efa2d1171bcb64c0456cd6362006e8dd54f403d7122aR184
    https://github.com/prebid/Prebid.js/releases/tag/9.31.0
  2. Prebid uses this reference as base object: https://github.com/prebid/Prebid.js/blob/9.53.x-legacy/modules/userId/eids.js#L63
  3. The eids from pubProvidedId are then added to it: https://github.com/prebid/Prebid.js/blob/9.53.x-legacy/modules/userId/eids.js#L61
  4. On the next iteration, the same object reference is used, already containing the eids from pubProvidedId, while continuing to add them to it

It's possible other ID modules have the same issue.
The below test page shows the issue in the console, where pbjs.getUserIdsAsEids() returns the id helloworld123 several times.

Test page: https://jsfiddle.net/va6kf1ym/1/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions