Skip to content

BeOpBidAdapter: Refacto beopid cookie to caudid#14584

Open
sebrobert wants to merge 3 commits intoprebid:masterfrom
BeOpinion:master
Open

BeOpBidAdapter: Refacto beopid cookie to caudid#14584
sebrobert wants to merge 3 commits intoprebid:masterfrom
BeOpinion:master

Conversation

@sebrobert
Copy link
Contributor

Type of change

  • Refactoring (no functional changes, no api changes)

Description of change

beopid became an obsolet cookie. We managed the update to caudid which is an ObjectId into our system, instead of the UUID before for the beopid

@sebrobert sebrobert changed the title BeOpBidAdapter: Refacto Change beopid cookie to caudid BeOpBidAdapter: Refacto beopid cookie to caudid Mar 12, 2026
@review-assignment-bot review-assignment-bot bot requested a review from osazos March 12, 2026 09:23
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 768da7a76b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

* @return {string}
*/
function generateObjectId() {
const timestamp = (Math.floor(Date.now() / 1000)).toString(16);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Zero-pad ObjectId timestamp to keep 24-char caudid

generateObjectId() uses (Math.floor(Date.now() / 1000)).toString(16) without padding, so when a client clock is set far in the past (or Date is mocked), the timestamp can be fewer than 8 hex chars and fg becomes shorter than 24 chars. That invalid value is still sent and written to caudid, which then fails your own ^[0-9a-fA-F]{24}$ check on every request and causes unstable user identity; padding the timestamp to 8 hex chars avoids this.

Useful? React with 👍 / 👎.

@coveralls
Copy link
Collaborator

coveralls commented Mar 12, 2026

Pull Request Test Coverage Report for Build 23002110154

Details

  • 93 of 93 (100.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.001%) to 96.338%

Files with Coverage Reduction New Missed Lines %
test/spec/modules/id5AnalyticsAdapter_spec.js 1 96.13%
libraries/medianetUtils/logger.js 2 83.78%
Totals Coverage Status
Change from base Build 22969985052: 0.001%
Covered Lines: 217950
Relevant Lines: 226235

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants