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

tappx Bid Adapter: fix wrong regex and gdpr bug #6834

Merged
merged 3 commits into from
May 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/tappxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { config } from '../src/config.js';
const BIDDER_CODE = 'tappx';
const TTL = 360;
const CUR = 'USD';
const TAPPX_BIDDER_VERSION = '0.1.10514';
const TAPPX_BIDDER_VERSION = '0.1.10526';
const TYPE_CNN = 'prebidjs';
const VIDEO_SUPPORT = ['instream'];

Expand Down Expand Up @@ -79,7 +79,7 @@ export const spec = {

// GDPR & CCPA
if (gdprConsent) {
url += '&gdpr=' + (gdprConsent.gdprApplies ? 1 : 0);
url += '&gdpr_optin=' + (gdprConsent.gdprApplies ? 1 : 0);
url += '&gdpr_consent=' + encodeURIComponent(gdprConsent.consentString || '');
}
if (uspConsent) {
Expand Down Expand Up @@ -120,7 +120,7 @@ function validBasic(bid) {
}

let classicEndpoint = true
if ((new RegExp(`^(vz.*|zz.*)\.*$`, 'i')).test(bid.params.host)) {
if ((new RegExp(`^(vz.*|zz.*)\\.*$`, 'i')).test(bid.params.host)) {
classicEndpoint = false
}

Expand Down Expand Up @@ -398,8 +398,8 @@ function getHostInfo(validBidRequests) {

domainInfo.domain = hostParam.split('/', 1)[0];

let regexNewEndpoints = new RegExp(`^(vz.*|zz.*)\.pub\.tappx\.com$`, 'i');
let regexClassicEndpoints = new RegExp(`^([a-z]{3}|testing)\.[a-z]{3}\.tappx\.com$`, 'i');
let regexNewEndpoints = new RegExp(`^(vz.*|zz.*)\\.[a-z]{3}\\.tappx\\.com$`, 'i');
let regexClassicEndpoints = new RegExp(`^([a-z]{3}|testing)\\.[a-z]{3}\\.tappx\\.com$`, 'i');

if (regexNewEndpoints.test(domainInfo.domain)) {
domainInfo.newEndpoint = true;
Expand Down