-
Notifications
You must be signed in to change notification settings - Fork 769
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
IQzone Bidder Adapter: add new bid param #1987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, added one minor comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
adapters/iqzone/iqzone.go
Outdated
for i, imp := range request.Imp { | ||
reqCopy.Imp = []openrtb2.Imp{imp} | ||
|
||
if err = json.Unmarshal(reqCopy.Imp[i].Ext, &bidderExt); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be json.Unmarshal(reqCopy.Imp[0].Ext, &bidderExt)
? Line 35 above you have defined reqCopy.Imp[]
to have only one entry in its array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, thanks for finding this problem, we fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for _, imp := range request.Imp { | ||
reqCopy.Imp = []openrtb2.Imp{imp} | ||
|
||
if err = json.Unmarshal(reqCopy.Imp[0].Ext, &bidderExt); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declaring bidderExt
and iqzoneExt
at the start rather than in the loop, means they are persistent. This could potentially cause an issue if a field that exists in imp[0]
is omitted from imp[1]
, the Unmarshal call will not zero out that parameter and thus you could see it where it does not belong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this bug and explaining it. We have fixed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
add IQZone adapter
add IQZone adapter
updated doc - prebid/prebid.github.io#3250