Skip to content

Commit

Permalink
removed localstorage bypass. (prebid#8702)
Browse files Browse the repository at this point in the history
Co-authored-by: Jose <[email protected]>
  • Loading branch information
2 people authored and jorgeluisrocha committed May 18, 2023
1 parent d5187b1 commit 8b4a8ef
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions modules/naveggIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ function readnavIDFromCookie() {
return storage.cookiesAreEnabled ? (storage.findSimilarCookies('nav') ? storage.findSimilarCookies('nav')[0] : null) : null;
}

function readnvgnavFromLocalStorage() {
var i;
const query = /[nvga]{3}\d+/;
for (i in window.localStorage) {
if (i.match(query) || (!query && typeof i === 'string')) {
const naveggId = storage.getDataFromLocalStorage(i.match(query).input).split('|')[0]
return naveggId.split('_')[0];
}
}
}

/** @type {Submodule} */
export const naveggIdSubmodule = {
/**
Expand Down Expand Up @@ -73,7 +62,7 @@ export const naveggIdSubmodule = {
getId() {
let naveggIdStringFromLocalStorage = null;
if (storage.localStorageIsEnabled) {
naveggIdStringFromLocalStorage = readnaveggIdFromLocalStorage() || readnvgnavFromLocalStorage();
naveggIdStringFromLocalStorage = readnaveggIdFromLocalStorage();
}

const naveggIdString = naveggIdStringFromLocalStorage || readnaveggIDFromCookie() || readoldnaveggIDFromCookie() || readnvgIDFromCookie() || readnavIDFromCookie();
Expand Down

0 comments on commit 8b4a8ef

Please sign in to comment.