peterleinchen / harbour-defender

Defender is a privacy guard for SailfishOS
GNU General Public License v3.0
5 stars 5 forks source link

Column baseDomain doesn't exist anymore in cookies.sql #4

Open pherjung opened 2 years ago

pherjung commented 2 years ago

I'm not sure what it has been replaced with. In Sailfish 4.4.0.58, current columns are :

pherjung commented 2 years ago

I checked with my Jolla 1 on Sailfish 3.4 and what could replace baseDomain is host. I tried following code and it should work :

exampleBaseDomain = '.events.ocdn.eu'.split('.') # retrieved from column host
baseDomain = '.'.join(exampleBaseDomain[-2:]
pherjung commented 2 years ago

I'm not sure if it's the best solution, but what about changing the SQL query? It doesn't work yet, but idea is to get the base domain from host using SQL functions.

thigg commented 1 year ago

It looks like basedomain was created using this function: https://hg.mozilla.org/mozilla-central/rev/c930febec76e#l1.348

This is how it is implemented in firefox and tests and interface It looks like this would be a valid js implementation

this will likely do the trick in python