Compare commits

..

No commits in common. "361546bcd4fcd6f9f32702f772d9b3fbc6cc972e" and "0a3f9504ac8c98e07c88075435652b67606f87a9" have entirely different histories.

5 changed files with 39 additions and 95 deletions

View File

@ -69,7 +69,6 @@ export default class ExtendedRequest {
public origin: string; public origin: string;
public initialized = false; public initialized = false;
public stolenData: StolenDataEntry[]; public stolenData: StolenDataEntry[];
public originalPathname: string;
constructor(public data: Request) { constructor(public data: Request) {
this.tabId = data.tabId; this.tabId = data.tabId;
@ -104,7 +103,6 @@ export default class ExtendedRequest {
this.originalURL = url; this.originalURL = url;
this.origin = new URL(url).origin; this.origin = new URL(url).origin;
this.originalPathname = new URL(url).pathname;
} }
isThirdParty() { isThirdParty() {

View File

@ -40,15 +40,7 @@ function ClusterRangeSummary({ cluster }: { cluster: RequestCluster }) {
function Placeholder({ children }: { children: string }) { function Placeholder({ children }: { children: string }) {
return ( return (
<span <span style={{ textDecoration: "underline", fontSize: "0.8em" }}>
style={{
textDecoration: "underline",
fontSize: "0.8em",
position: "relative",
textUnderlineOffset: "4px",
bottom: "3px",
}}
>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style={{ color: "gray" }}>({children})</span> <span style={{ color: "gray" }}>({children})</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;
@ -100,9 +92,10 @@ export default function EmailTemplate2({
sposobów, w jaki strona przetwarza moje dane osobowe.{" "} sposobów, w jaki strona przetwarza moje dane osobowe.{" "}
</p> </p>
<p> <p>
<img {...{ src: config.popup_screenshot_base64 }} /> <img {...{ src: config.popup_screenshot_base64 }} />${}
</p> </p>
<p> <p>
$
{config.popup_action === "ignored" {config.popup_action === "ignored"
? /* HTML */ `Nie kliknąłem żadnego przycisku w tym okienku. W ? /* HTML */ `Nie kliknąłem żadnego przycisku w tym okienku. W
szczególności nie kliknąłem przycisku szczególności nie kliknąłem przycisku
@ -123,13 +116,11 @@ export default function EmailTemplate2({
{Object.values(clusters) {Object.values(clusters)
.filter((cluster) => cluster.hasMarks()) .filter((cluster) => cluster.hasMarks())
.map((cluster) => ( .map((cluster) => (
<DomainSummary cluster={cluster} key={cluster.id} /> <DomainSummary cluster={cluster} />
))} ))}
</ul> </ul>
{config.popup_action === "ignored" ? ( {config.popup_action === "ignored" ? (
<p> <p>Dane te zostały wysłane zanim kliknąłem cokolwiek na tej stronie.</p>
Dane te zostały wysłane, zanim kliknąłem cokolwiek na tej stronie.
</p>
) : config.popup_action === "accepted" ? ( ) : config.popup_action === "accepted" ? (
<p> <p>
Dane te zostały wysłane po tym, jak kliknąłem przycisk Dane te zostały wysłane po tym, jak kliknąłem przycisk
@ -175,9 +166,7 @@ export default function EmailTemplate2({
W przypadku opisywanej przeze mnie mojej wizyty na Państwa stronie nie W przypadku opisywanej przeze mnie mojej wizyty na Państwa stronie nie
ma zastosowania Zgoda, gdyż{" "} ma zastosowania Zgoda, gdyż{" "}
{config.popup_action === "ignored" {config.popup_action === "ignored"
? /* HTML */ `nie wyrażałem żadnej zgody na takie przetwarzanie moich ? `nie wyrażałem żadnej zgody na takie przetwarzanie moich danych`
danych &mdash;w szczególności nie kliknąłem przycisku
${config.popup_accept_all_text}`
: /* HTML */ `o ile po wejściu na stronę wcisnąłem w wyskakującym : /* HTML */ `o ile po wejściu na stronę wcisnąłem w wyskakującym
okienku przycisk ${config.popup_accept_all_text}, o tyle nie okienku przycisk ${config.popup_accept_all_text}, o tyle nie
stanowi to według mnie ważnej w świetle RODO zgody, gdyż brakowało w stanowi to według mnie ważnej w świetle RODO zgody, gdyż brakowało w
@ -283,7 +272,9 @@ export default function EmailTemplate2({
{Object.values(clusters) {Object.values(clusters)
.filter((cluster) => cluster.hasMarks()) .filter((cluster) => cluster.hasMarks())
.map((cluster) => ( .map((cluster) => (
<li key={cluster.id} style={{ paddingBottom: "1rem" }}> <li key={cluster.id}>
{" "}
style={{ paddingBottom: "1rem" }}
ujawniła pańskie dane w zakresie{" "} ujawniła pańskie dane w zakresie{" "}
<em> <em>
<ClusterRangeSummary {...{ cluster }} /> <ClusterRangeSummary {...{ cluster }} />
@ -307,9 +298,8 @@ export default function EmailTemplate2({
kogo? jaki podmiot podejmuje wspomniane działania lub jest kogo? jaki podmiot podejmuje wspomniane działania lub jest
beneficjentem wspomnianych korzyści? beneficjentem wspomnianych korzyści?
</Placeholder> </Placeholder>
. Ujawnienie <ClusterRangeSummary {...{ cluster }} /> temu . Ujawnienie tych danych temu podmiotowi przez naszą stronę było
podmiotowi przez naszą stronę było konieczne dla potrzeb konieczne dla potrzeb wynikających z tego interesu, ponieważ
wynikających z tego interesu, ponieważ
<Placeholder>uzasadnienie konieczności</Placeholder>.<br /> <Placeholder>uzasadnienie konieczności</Placeholder>.<br />
</li> </li>
))} ))}

View File

@ -63,16 +63,8 @@ export class RequestCluster extends EventEmitter {
return -1; return -1;
} else if (indexA > indexB) { } else if (indexA > indexB) {
return 1; return 1;
} else if (entry1.value.length > entry2.value.length) {
return -1;
} else if (entry1.value.length < entry2.value.length) {
return 1;
} else if (entry1.isMarked && !entry2.isMarked) {
return -1;
} else if (!entry1.isMarked && entry2.isMarked) {
return 1;
} else { } else {
return 0; return entry1.value.length > entry2.value.length ? -1 : 1;
} }
} }
}) })
@ -163,10 +155,4 @@ export class RequestCluster extends EventEmitter {
exposesOrigin() { exposesOrigin() {
return this.requests.some((request) => request.exposesOrigin()); return this.requests.some((request) => request.exposesOrigin());
} }
autoMark() {
this.getRepresentativeStolenData().forEach((entry) => {
entry.autoMark();
});
}
} }

View File

@ -23,12 +23,8 @@ export function StolenData({
if (!origin) { if (!origin) {
return <div></div>; return <div></div>;
} }
const clusters = Object.values(getMemory().getClustersForOrigin(origin)) const clusters = Object.values(getMemory().getClustersForOrigin(origin)).sort(
.sort(RequestCluster.sortCompare) RequestCluster.sortCompare
.filter((cluster) => !cookiesOnly || cluster.hasCookies())
.filter(
(cluster) =>
!cookiesOrOriginOnly || cluster.hasCookies() || cluster.exposesOrigin()
); );
return ( return (
<div style={{ padding: "5px" }}> <div style={{ padding: "5px" }}>
@ -57,12 +53,6 @@ export function StolenData({
Wyczyść pamięć Wyczyść pamięć
</button> </button>
<button <button
onClick={() => clusters.forEach((cluster) => cluster.autoMark())}
>
Zaznacz automatycznie
</button>
<button
style={{ marginLeft: "1rem" }}
onClick={() => onClick={() =>
window.open( window.open(
`/report-window/report-window.html?origin=${origin}`, `/report-window/report-window.html?origin=${origin}`,
@ -74,7 +64,15 @@ export function StolenData({
Generuj maila Generuj maila
</button> </button>
</h1> </h1>
{clusters.map((cluster) => { {clusters
.filter((cluster) => !cookiesOnly || cluster.hasCookies())
.filter(
(cluster) =>
!cookiesOrOriginOnly ||
cluster.hasCookies() ||
cluster.exposesOrigin()
)
.map((cluster) => {
return ( return (
<StolenDataCluster <StolenDataCluster
origin={origin} origin={origin}

View File

@ -21,7 +21,6 @@ export const Classifications = <const>{
}; };
const ID_PREVIEW_MAX_LENGTH = 20; const ID_PREVIEW_MAX_LENGTH = 20;
const MIN_COOKIE_LENGTH_FOR_AUTO_MARK = 15;
const id = (function* id() { const id = (function* id() {
let i = 0; let i = 0;
@ -148,20 +147,14 @@ export class StolenDataEntry extends EventEmitter {
} }
mark() { mark() {
const had_been_marked_before = this.marked;
this.marked = true; this.marked = true;
if (!had_been_marked_before) {
this.emit("change"); this.emit("change");
} }
}
unmark() { unmark() {
const had_been_marked_before = this.marked;
this.marked = false; this.marked = false;
if (had_been_marked_before) {
this.emit("change"); this.emit("change");
} }
}
toggleMark() { toggleMark() {
if (this.marked) { if (this.marked) {
@ -178,7 +171,6 @@ export class StolenDataEntry extends EventEmitter {
[ [
this.request.origin, this.request.origin,
this.request.originalURL, this.request.originalURL,
this.request.originalPathname,
getshorthost(this.request.origin), getshorthost(this.request.origin),
].some((needle) => haystack.includes(needle)) ].some((needle) => haystack.includes(needle))
) )
@ -223,26 +215,6 @@ export class StolenDataEntry extends EventEmitter {
} }
exposesOrigin(): boolean { exposesOrigin(): boolean {
return ( return this.value.includes(getshorthost(this.request.origin));
this.value.includes(getshorthost(this.request.origin)) ||
this.value.includes(this.request.originalPathname)
);
}
autoMark() {
if (
this.classification == "history" ||
((this.source === "cookie" ||
this.name.toLowerCase().includes("id") ||
this.name.toLowerCase().includes("cookie") ||
this.name.toLowerCase().includes("ga") ||
this.name.toLowerCase().includes("fb")) &&
this.value.length > MIN_COOKIE_LENGTH_FOR_AUTO_MARK)
) {
if (this.request.shorthost.includes("google") && this.name == "CONSENT") {
return;
}
this.mark();
}
} }
} }