Version 1.19.0

#570
#578
#580
#581
#587
#599
This commit is contained in:
Kevin R 2020-07-22 00:30:09 +02:00
parent 6c775b9bba
commit db5bd659f0
4 changed files with 93 additions and 7 deletions

View File

@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.19.0] - 2020-07-22
### Compatibility note
- Require Firefox >= 55
- Require Chrome >= 37
### Changed
- Changed url decoding to prevent endless loop
## [1.18.1] - 2020-06-07
### Compatibility note

View File

@ -101,6 +101,10 @@ function extractHost(url) {
function checkLocalURL(url) {
let host = extractHost(url);
if(!host.match(/^\d/) && host !== 'localhost') {
return false;
}
return ipRangeCheck(host, ["10.0.0.0/8", "172.16.0.0/12",
"192.168.0.0/16", "100.64.0.0/10",
"169.254.0.0/16", "127.0.0.1"]) ||
@ -271,17 +275,29 @@ function getBrowser() {
/**
* Decodes an URL, also one that is encoded multiple times.
*
* @see https://stackoverflow.com/a/38265168
*
* @param url the url, that should be decoded
*/
function decodeURL(url) {
const rtn = decodeURIComponent(url);
if (rtn.indexOf("http://") === -1 && rtn.indexOf("https://") === -1) {
return decodeURL(rtn);
let rtn = decodeURIComponent(url);
while(isEncodedURI(rtn)) {
rtn = decodeURIComponent(rtn);
}
return rtn;
}
/**
* Returns true, iff the given URI is encoded
* @see https://stackoverflow.com/a/38265168
*/
function isEncodedURI(uri) {
return uri !== decodeURIComponent(uri || '')
}
/**
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
*

View File

@ -176,7 +176,8 @@
"redirections": [
".*google\\..*\\/.*url\\?.*url=((https|http)[^&]+)",
".*google\\..*\\/.*url\\?.*q=((https|http)[^&]+)",
".*google\\..*\\/.*adurl=([^&]+)"
".*google\\..*\\/.*adurl=([^&]+)",
".*google\\..*\\/amp\\/s\\/([^&]*)"
],
"forceRedirection": true
},
@ -1632,7 +1633,6 @@
"pos",
"abtest",
"trackInfo",
"user_number_id",
"utkn",
"scene",
"mytmenu",
@ -1640,7 +1640,8 @@
"lygClk",
"impid",
"bftTag",
"bftRwd"
"bftRwd",
"spm"
],
"referralMarketing": [],
"rawRules": [],
@ -2087,6 +2088,66 @@
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"roblox.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(roblox)(\\.com).*",
"completeProvider": false,
"rules": [
"refPageId"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"cell.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(cell)(\\.com).*",
"completeProvider": false,
"rules": [
"_returnURL"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"academic.oup.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(academic\\.)(oup)(\\.com).*",
"completeProvider": false,
"rules": [
"redirectedFrom"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"flexlinkspro.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(flexlinkspro)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},
"agata88.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(flexlinkspro)(\\.com).*",
"completeProvider": false,
"rules": [
"source"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
}
}
}

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "ClearURLs",
"version": "1.18.1",
"version": "1.19.0",
"author": "Kevin Röbert",
"description": "__MSG_extension_description__",
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",