1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

Use encodeURIComponent instead of btoa

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/772
This commit is contained in:
Raymond Hill 2019-11-04 13:12:40 -05:00
parent 53304dbbc1
commit ec5191004c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ let details = {};
{
const matches = /details=([^&]+)/.exec(window.location.search);
if ( matches !== null ) {
details = JSON.parse(atob(matches[1]));
details = JSON.parse(decodeURIComponent(matches[1]));
}
}

View File

@ -311,7 +311,7 @@
if ( targetURL.startsWith(vAPI.getURL('document-blocked.html')) ) {
const matches = /details=([^&]+)/.exec(targetURL);
if ( matches !== null ) {
targetURL = JSON.parse(atob(matches[1])).url;
targetURL = JSON.parse(decodeURIComponent(matches[1])).url;
}
}

View File

@ -217,7 +217,7 @@ const onBeforeRootFrameRequest = function(fctxt) {
if ( logData === undefined ) { return; }
// Blocked
const query = btoa(JSON.stringify({
const query = encodeURIComponent(JSON.stringify({
url: requestURL,
hn: requestHostname,
dn: fctxt.getDomain() || requestHostname,