Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow NPM to access private methods #9723

Closed
ChrisHuie opened this issue Mar 28, 2023 · 5 comments · Fixed by #11474
Closed

Don't allow NPM to access private methods #9723

ChrisHuie opened this issue Mar 28, 2023 · 5 comments · Fixed by #11474

Comments

@ChrisHuie
Copy link
Collaborator

Using Prebid as a dependency allows access to private methods such as gdprDataHandler in this case #9333 (comment). Proposal to no longer allow this behavior in Prebid 8. Still reviewing the bandwidth that would be needed for this issue.

@patmmccann
Copy link
Collaborator

perhaps cut for time ? tbd, to discuss with pubs?

@patmmccann
Copy link
Collaborator

@JulieLorin @khatibda @muuki88 do you have projects that import prebid as an npm? can you provide any feedback here?

@muuki88
Copy link
Collaborator

muuki88 commented Mar 29, 2023

We use Prebid as an NPM dependency and only use the processQueue() ( or something like that ) to init Prebid.

All other access happens through public APIs.

@JulieLorin
Copy link
Collaborator

We use Prebid as an NPM dependency, but we are using more than just the processQueue function.
We have a few customizations (for handling consent for example as mentionned in #9333 (comment)
We are using the registerBidder ourselves to be able to add custom bidders (that would need to use functions/code from our codebase) for example. (though it seems this function is also available though the API so it may be irrelevant here)
For rendering, as we are not using prebid universal creative, we use auctionManager to inform prebid of a bid won and emit an event.

I think allowing prebid to be used as a library is useful to be able to use only some parts of prebid.js but not all of them (for example, being able to manage instream without needing a prebid-cache compatible endpoint).
This can sometimes also helps with fixing bugs before a fix is released in prebid.
I think it is very much acceptable to allow it "at your own risks" only, but making it impossible doesn't seem required to me.

@olafbuitelaar
Copy link
Contributor

we're also using the registerBidder, in fact it would be nice it was a public method, like; pbjs.registerBidder . We also use other internal functions like; filters from prebid.js/src/targeting or createBid from prebid.js/src/bidfactory

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

Successfully merging a pull request may close this issue.

5 participants