From bce10a642d8332fc83cd7f3a093fb54d86e5f2c3 Mon Sep 17 00:00:00 2001 From: nobody42 <5514211-nobody42@users.noreply.gitlab.com> Date: Mon, 11 May 2020 05:43:54 +0200 Subject: [PATCH 01/14] Updated i18n (IT) --- _locales/it/messages.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 3811d719..3c2fa265 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Protegge dal tracciamento tramite CDN centralizzato \"gratis\".", + "message": "Protegge dal tracciamento tramite CDN centralizzati \"liberi\".", "description": "Extension description." }, "disableProtectionTitle": { @@ -16,7 +16,7 @@ "description": "Amount injected title." }, "amountInjectedDescription": { - "message": "Quantità di iniezioni di risorse dalla Rete di Distribuzione di Contenuti locale sin dall'installazione.", + "message": "Quantità di iniezioni di risorse dalla CDN locale sin dall'installazione.", "description": "Amount injected description." }, "optionsTitle": { @@ -32,7 +32,7 @@ "description": "Show icon badge description." }, "blockMissingTitle": { - "message": "Bloccare richieste di risorse mancanti", + "message": "Blocca le richieste di risorse mancanti", "description": "Block requests for missing resources title." }, "blockMissingDescription": { @@ -40,27 +40,27 @@ "description": "Block requests for missing resources description." }, "disablePrefetchTitle": { - "message": "Disabilita il prefetching dei link", + "message": "Disabilita il precaricamento dei collegamenti", "description": "Disable prefetch title." }, "disablePrefetchDescription": { - "message": "Impedisci alle richieste vietate di informare le reti di consegna.", + "message": "Impedisci alle richieste non consentite di uscire dalle reti di distribuzione.", "description": "Disable prefetch description." }, "stripMetadataTitle": { - "message": "Elimina i metadata dalle richieste consentite", + "message": "Togli i metadati dalle richieste consentite", "description": "Strip metadata title." }, "stripMetadataDescription": { - "message": "Cancella i dati sensibili dalle richieste CDN consentite per una migliore privacy.", + "message": "Cancella i dati sensibili dalle richieste consentite alle CDN per migliorare la privacy.", "description": "Strip metadata description." }, "whitelistedDomainsTitle": { - "message": "Escludere domini dalle ispezioni", + "message": "Escludi i domini dalle ispezioni", "description": "Whitelisted domains title." }, "whitelistedDomainsDescription": { - "message": "Inserire domini nella whitelist per escluderli. Separare voci multiple con punti e virgola (;).", + "message": "Inserisci i domini nella whitelist per escluderli. Separa le voci multiple con punti e virgola (;).", "description": "Whitelisted domains description." }, "advancedLabel": { @@ -68,43 +68,43 @@ "description": "Advanced label." }, "generateRuleSetTitle": { - "message": "Genera set di regole per uBlock o uMatrix", + "message": "Genera gruppo di regole per uBlock o uMatrix", "description": "Generate rule set title." }, "generateRuleSetDescription": { - "message": "", + "message": "Nel caso stessi utilizzando uBlock o uMatrix è possibile generare le regole qui. È necessario aggiungere queste regole manualmente in uBlock o uMatrix.", "description": "In case you're using uBlock or uMatrix you can generate the rules here. You have to add these rules manually in uBlock or uMatrix." }, "lastUpdate": { - "message": "", + "message": "Ultimo aggiornamento:", "description": "Last update." }, "copyRuleSet": { - "message": "", + "message": "Copia", "description": "Text of button to copy ruleset." }, "loggingTitle": { - "message": "", + "message": "Abilita l'accesso alla console del browser", "description": "Enable logging in browser console." }, "loggingDescription": { - "message": "", + "message": "Apri la Console del Browser ( CTRL + SHIFT + J ) per mostrare le risorse mancanti", "description": "Open \"Browser Console\" ( CTRL + SHIFT + J ) to show missing resources." }, "hideReleaseNotesTitle": { - "message": "", + "message": "Disabilita le note di rilascio", "description": "Disable release notes" }, "hideReleaseNotesDescription": { - "message": "", + "message": "Se abilitato, non riceverai alcuna informazione sulle nuove funzionalità di LocalCDN. Questo include informazioni sulle nuove regole per uBlock/uMatrix.", "description": "If enabled, you wont receive any information about new features in LocalCDN. This includes information about new uBlock/uMatrix rules." }, "featureBreaksWebsitesDescription": { - "message": "", + "message": "Questa funzione rompe i siti web. Non lasciarla abilitata, a meno che tu non sia pronto a mettere manualmente nella whitelist i domini interessati.", "description": "This feature breaks websites. Do not leave it enabled, unless you are prepared to manually whitelist any affected domains." }, "featureBreaksWebsitesButton": { - "message": "", + "message": "Disabilita", "description": "Disable" } } From e81345ca5101dde507b17ac95189c79fbf8092c3 Mon Sep 17 00:00:00 2001 From: Paba22 <5916733-Paba22@users.noreply.gitlab.com> Date: Mon, 11 May 2020 19:38:52 +0200 Subject: [PATCH 02/14] Update Polish translation --- _locales/pl/messages.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index a0cb0c46..bce40bbe 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -72,39 +72,39 @@ "description": "Generate rule set title." }, "generateRuleSetDescription": { - "message": "", + "message": "Jeśli używasz uBlock lub uMatrix, to możesz wygenerować tutaj odpowiednie reguły. Musisz je potem dodać ręcznie w uBlock albo uMatrix.", "description": "In case you're using uBlock or uMatrix you can generate the rules here. You have to add these rules manually in uBlock or uMatrix." }, "lastUpdate": { - "message": "", + "message": "Ostatnia aktualizacja: ", "description": "Last update." }, "copyRuleSet": { - "message": "", + "message": "Kopiuj", "description": "Text of button to copy ruleset." }, "loggingTitle": { - "message": "", + "message": "Włącz logowanie w konsoli przeglądarki.", "description": "Enable logging in browser console." }, "loggingDescription": { - "message": "", + "message": "Otwórz \"Konsolę Przeglądarki\" ( CTRL + SHIFT + J) żeby wyświetlić brakujące zasoby.", "description": "Open \"Browser Console\" ( CTRL + SHIFT + J ) to show missing resources." }, "hideReleaseNotesTitle": { - "message": "", + "message": "Wyłącz informacje o zmianach", "description": "Disable release notes" }, "hideReleaseNotesDescription": { - "message": "", + "message": "Po włączeniu nie będziesz otrzymywać żadnych informacji o nowych funkcjach w LocalCDN. W tym informacji o nowych regułach uBlock/uMatrix.", "description": "If enabled, you wont receive any information about new features in LocalCDN. This includes information about new uBlock/uMatrix rules." }, "featureBreaksWebsitesDescription": { - "message": "", + "message": "Ta opcja psuje strony. Nie włączaj jej, chyba że jesteś gotów samemu dodawać niedziałające domeny do białej listy.", "description": "This feature breaks websites. Do not leave it enabled, unless you are prepared to manually whitelist any affected domains." }, "featureBreaksWebsitesButton": { - "message": "", + "message": "Wyłącz", "description": "Disable" } } From 685d627ce2ce5a85919fa6da5b77f0db8d2a5670 Mon Sep 17 00:00:00 2001 From: Paba22 <5916733-Paba22@users.noreply.gitlab.com> Date: Mon, 11 May 2020 19:39:50 +0200 Subject: [PATCH 03/14] Add missing strings in en_GB locale --- _locales/en_GB/messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_locales/en_GB/messages.json b/_locales/en_GB/messages.json index 660eb2ad..99a13eb3 100644 --- a/_locales/en_GB/messages.json +++ b/_locales/en_GB/messages.json @@ -100,11 +100,11 @@ "description": "If enabled, you wont receive any information about new features in LocalCDN. This includes information about new uBlock/uMatrix rules." }, "featureBreaksWebsitesDescription": { - "message": "", + "message": "This feature breaks websites. Do not leave it enabled, unless you are prepared to manually whitelist any affected domains.", "description": "This feature breaks websites. Do not leave it enabled, unless you are prepared to manually whitelist any affected domains." }, "featureBreaksWebsitesButton": { - "message": "", + "message": "Disable", "description": "Disable" } } From dc230e436f1edbaad0ee2317bc5f246a54048ef5 Mon Sep 17 00:00:00 2001 From: nobody42 <5514211-nobody42@users.noreply.gitlab.com> Date: Tue, 12 May 2020 06:50:34 +0200 Subject: [PATCH 04/14] Updated README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe400b4e..96a05664 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ A web browser extension that emulates Content Delivery Networks to improve your LocalCDN based on Decentraleyes. It includes more frameworks and more CDNs: -* **New: Font Awesome v4.7.0 and v5.7.2** :tada: :tada: :tada: +* **NEW: Removed integrity checks of embedded script and style elements** :tada: :tada: :tada: +* Font Awesome * jQuery up to 3.4.1 * Bootstrap CSS (Delivered by StackPath, NetDNA and MaxCDN) * Bootstrap JavaScript (Delivered by StackPath, NetDNA and MaxCDN) @@ -64,6 +65,11 @@ Please read this [developer guide](https://developer.mozilla.org/en-US/Add-ons/W > **Important:** All tagged commits are signed with GPG. It's likely best to ignore unsigned commits, unless you really know what you're doing. Please send an email if you have any questions or security concerns. +## Contact + +Just open an issue with your question or write an email. The address and a PGP key can be found [here](https://localcdn.de/contact/). + + ## Donations LocalCDN is free, open-source and based on Decentraleyes. If you like LocalCDN and/or Decentraleyes you can support continued development by making a donation. Any help would be greatly appreciated! From 636444cd7685db7527cd6cb1088f5f56a7d210c9 Mon Sep 17 00:00:00 2001 From: nobody42 <5514211-nobody42@users.noreply.gitlab.com> Date: Sat, 16 May 2020 17:35:26 +0200 Subject: [PATCH 05/14] Fixed encoding problem with some websites (#75) --- core/constants.js | 15 ++++++++++++++- core/manipulate-dom.js | 14 +++++++++++++- manifest.json | 2 +- pages/updates/updates.html | 3 +++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/core/constants.js b/core/constants.js index 756a5950..9e20a063 100644 --- a/core/constants.js +++ b/core/constants.js @@ -92,4 +92,17 @@ const Whitelist = { const BrowserType = { 'CHROMIUM': chrome.runtime.getURL("/").startsWith("chrome-extension"), 'FIREFOX': chrome.runtime.getURL("/").startsWith("moz-extension") -} +}; + +const CharsetDomains = { + 'dejure.org': 'iso-8859-1', + 'privacy-handbuch.de': 'iso-8859-1', + 'winfuture.de': 'iso-8859-1', + 'drwindows.de': 'iso-8859-1', + 'sphinx-soft.com': 'iso-8859-1', + 'ekaterinaguseva.ru': 'windows-1251', + 'hobbybrauerversand.de': 'iso-8859-1', + 'pro-linux.de': 'iso-8859-15', + 'gwdg.de': 'windows-1252', + 'tyurem.net': 'windows-1251' +}; diff --git a/core/manipulate-dom.js b/core/manipulate-dom.js index 2593a2af..05d21885 100644 --- a/core/manipulate-dom.js +++ b/core/manipulate-dom.js @@ -26,6 +26,18 @@ var manipulateDOM = {}; * Private Methods */ +manipulateDOM._getEncoding = function (domain) { + + let encodingByDomain = CharsetDomains[domain]; + + if(typeof encodingByDomain === 'undefined') { + return 'UTF-8'; + } + + return encodingByDomain; + +}; + manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) { // by Jaap (https://gitlab.com/Jaaap) @@ -44,7 +56,7 @@ manipulateDOM._removeCrossOriginAndIntegrityAttr = function (details) { if (!isWhitelisted && mimeType === 'text/html') { header.value = 'text/html; charset=UTF-8'; - let decoder = new TextDecoder(charset); + let decoder = new TextDecoder(manipulateDOM._getEncoding(initiatorDomain)); let encoder = new TextEncoder(); let filter = browser.webRequest.filterResponseData(details.requestId); diff --git a/manifest.json b/manifest.json index 3938c8d3..388a45c1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "LocalCDN (fork from Decentraleyes)", - "version": "2.2.0", + "version": "2.2.1", "browser_specific_settings": { "gecko": { "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 0b7937b0..2eb4a044 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -21,6 +21,9 @@
New in LocalCDN: +