From d04bb51a4d68e4ac1568cb8f47bea020594c2571 Mon Sep 17 00:00:00 2001 From: Thomas Rientjes <synzvato@protonmail.com> Date: Fri, 25 Nov 2016 23:50:27 +0100 Subject: [PATCH] Improve detection of tainted Yandex domains --- lib/interceptor.js | 2 +- lib/load-watcher.js | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/interceptor.js b/lib/interceptor.js index bb92528..262a305 100644 --- a/lib/interceptor.js +++ b/lib/interceptor.js @@ -107,7 +107,7 @@ var Interceptor = new Class({ httpChannel.loadInfo && httpChannel.loadInfo.loadingDocument && httpChannel.loadInfo.loadingDocument.domain || httpChannel.referrer && httpChannel.referrer.host; - if (storage.taintedDomains[initiatorDomain]) { + if (storage.taintedDomains[initiatorDomain] || /yandex\./.test(initiatorDomain)) { return this.handleMissingCandidate(httpChannel); } diff --git a/lib/load-watcher.js b/lib/load-watcher.js index 32ac75e..dcd4496 100644 --- a/lib/load-watcher.js +++ b/lib/load-watcher.js @@ -60,24 +60,10 @@ var storage = simpleStorage.storage; */ var undetectableTaintedDomains = { - 'direct.yandex.com': true, - 'direct.yandex.ru': true, - 'disk.yandex.com': true, - 'disk.yandex.ru': true, - 'mail.yandex.com': true, - 'mail.yandex.ru': true, 'minigames.mail.ru': true, - 'news.yandex.ru': true, - 'news.yandex.ua': true, 'passport.twitch.tv': true, - 'passport.yandex.com': true, - 'passport.yandex.ru': true, - 'taxi.yandex.com': true, - 'taxi.yandex.ru': true, 'ya.ru': true, - 'yadi.sk': true, - 'yandex.com': true, - 'yandex.ru': true + 'yadi.sk': true }; /** -- GitLab