Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Commit

Permalink
Merge tag '1.15.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-ashley committed Apr 3, 2018
2 parents 2b51e9a + 943a2b9 commit 2a30892
Show file tree
Hide file tree
Showing 48 changed files with 735 additions and 540 deletions.
81 changes: 9 additions & 72 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,20 @@
# Submitting issues

From now on, I will be quite less inclined to deal with issues for which little to no investigation to find the **actual cause** of a purported issue was made by the reporter. Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible. This project is a hobby, do not expect "customer support"-style interaction. Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with [invalid issues](https://github.com/gorhill/uBlock/issues?q=is%3Aissue+is%3Aclosed+label%3Ainvalid) or [issues unrelated](https://github.com/gorhill/uBlock/issues?q=is%3Aissue+is%3Aclosed+label%3Aexternal) to uBO.
Despite all the guidelines and warnings I added over the years about how to use it, the GitHub issue tracker always end up being used as a [help desk](https://en.wikipedia.org/wiki/Help_desk) rather than a place to report actual, real and proven issues.

For **support/discussions/help**, there is [/r/uBlockOrigin](https://www.reddit.com/r/uBlockOrigin/) on Reddit -- this is where I see the most activity for people helping each other regarding uBlock Origin.
Typically help desk are best handled by enthusiast volunteers -- so hopefully this is what will happen.

For **filter-related issues**, report on the respective filter list support site, or at [uBlockOrigin/uAssets](https://github.com/uBlockOrigin/uAssets/issues). Use [the logger](https://github.com/gorhill/uBlock/wiki/The-logger) to diagnose/confirm filter-related issues. If something does not work properly with uBO enabled, the **first step** is to rule out filter-related issues.
Given this, from now on I will consider GitHub issue tracker as a help desk one for uBlock Origin. I unsubscribed from being notified from all issues being opened, I will visit once in a while as time and mood allow.

Ignorance of the above rules is no excuse: **Opening an issue for purpose of support or discussion, or opening a filter-related issue will result in the user being immediately blocked.** Given the [amount of invalid issues being opened](https://github.com/gorhill/uBlock/issues?q=is%3Aissue+label%3Ainvalid+is%3Aclosed), I have no choice but to resort to such a drastic measure. You will still be able to open filter list issues at [uBlockOrigin/uAssets](https://github.com/uBlockOrigin/uAssets/issues).
When I will be visiting the "help desk", I will focus **only** on issues which I have good reasons to believe to be valid issues with uBlock Origin **itself**.

**The issue tracker is for provable issues only:** You will have to make the case that the issue is really with uBlock Origin and not something else on your side. To make a case means to provide detailed steps so that anybody can reproduce the issue. Be sure to rule out that the issue is not caused by something specific on your side. Specifically, _speculated_ performance issues will be marked as invalid and closed if they do not come with **actual profiling data + analysis** supporting the claim.
Valid issues typically comes with minimal but detailed steps to reproduce (i.e. no guesswork whatsoever required for others to reproduce), and especially genuine efforts to investigate the cause of an issue **as far as possible** using all the browser tools (uBO is HTML/CSS/JS, the browser has all the tools to investigate all of this). These will have my attention, and I will address them.

**Any issue opened without effort to provide the required details for me (or anybody else) to reproduce the problem will be closed as _invalid_.** If you provide more details thereafter for me to reproduce the issue, I will reopen it if I can confirm there is indeed an issue with uBlock Origin. Example of detailed steps:

> 1. browser version/ublock version
> 1. these settings, these filter lists, these custom filters.
> 1. do this.
> 1. open this exact URL.
> 1. do this.
> 1. observe this.
> 1. click this.
> 1. observe such and such issue
> 1. see screenshot
> 1. etc.
The most important part when opening an issue: **detailed steps**.

**Important:** I simply do not have the time to take care of filter-related issues, you will have to find help elsewhere for this. The mere need to have to respond to filter-related issues can quickly become a burden. Consider that writing code/doc occupies all my free time. Surely there are other people out there ready to help with filter-related issues, it does not have to be me.

***

### Before you submit

1. Submit **bugs/issues only**.
- Bugs occur, I will fix them.
1. _One specific_ issue per submission.
1. The logger is the tool of choice to use to help diagnose issues.
1. Do **NOT**:
- Submit pull requests.
- Submit design ideas.
- Submit feature requests.
- Submit "revolutionary ideas".
- Post comments like "+1" or "me too!" without providing new relevant info on the issue.
- Use issues as replacement for threads on a bulletin board.
- Any such issue will be closed without comment.
- Ask me to publish the latest version to AMO/Chrome store: In all likelihood it is already published, but pending review, something which is out of my control.
1. Make sure your issue [hasn't already been fixed in a recent release](https://github.com/gorhill/uBlock/releases).
1. Verify that the issue does **not** occur with uBlock disabled.
1. **Verify that the issue is not related to a 3rd-party filter lists.**
- Issues with 3rd-party filter lists are the responsibility of their respective maintainers.
1. Verify that the issue is not caused by another extension.
1. Do not submit issues which can be reproduced **only** on Chrome Canary or Firefox Nightly: these are not stable browser versions and in all likelihood, whatever issue is not within uBO.
- Report **only** if you can reproduce in an official stable release, or a beta release.
In case I am really needed for a given issue, you can mention me using `@gorhill` so that GitHub will notify me.

***

### What to include

To help diagnose and fix the bug/issue, please always include the following in your report:

* A clear list of steps to reproduce the problem
* **ALWAYS INCLUDE A SPECIFIC URL WHERE THE ISSUE OCCURS**, _even_ if "it happens everywhere".
* Symptoms of the issue
* Describe what you observe and consider broken behavior; this is what we'll be looking for after executing the steps
* Example: video doesn't start playing, page layout broken
* Include whatever relevant the logger reports.
* A screenshot or transcription of **any of uBlock's preferences that differ from the defaults**
* This includes a whitelisted website, enabled/disabled filter list, anything
* Please do include everything different from the defaults whether or not it seems relevant to your issue
* The version of uBlock you're having the issue with; you can find this in [uBlock's popup UI](https://github.com/gorhill/uBlock/wiki/Quick-guide:-popup-user-interface)
* Example: `uBlock 0.9.0.0`
* The browser you're using and its version
* Examples: `Firefox 36`, `Chrome 41.0.2272`
* The OS you're using and its version
* Examples: `Windows 8.1`, `Linux Mint 17.1`
* A list of other extensions you have installed
* Tip: try disabling them and see if your issue still occurs

Otherwise, we've noticed that a lot of **your** time (and the developers') gets thrown away on exchanging back and forth to get this information.

***
Good readings:

**Good read:** [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).
- [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html)
- [Why I didn’t fix your bug](http://magnusmanske.de/wordpress/?p=518)
6 changes: 3 additions & 3 deletions dist/firefox/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"[email protected]": {
"updates": [
{
"version": "1.15.17b1",
"version": "1.15.19rc6",
"applications": { "gecko": { "strict_min_version": "52" } },
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.15.17b1",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.15.17b1/uBlock0.webext.signed.xpi"
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.15.19rc6",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.15.19rc6/uBlock0.webext.signed.xpi"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion dist/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.18
1.15.22
107 changes: 23 additions & 84 deletions platform/chromium/vapi-webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ vAPI.net.registerListeners = function() {
};

var normalizeRequestDetails = function(details) {
// Chromium 63+ supports the `initiator` property, which contains
// the URL of the origin from which the network request was made.
if (
details.tabId === vAPI.noTabId &&
typeof details.initiator === 'string'
) {
details.tabId = vAPI.anyTabId;
details.documentUrl = details.initiator;
}

var type = details.type;

// https://github.com/gorhill/uBlock/issues/1493
Expand Down Expand Up @@ -159,54 +169,11 @@ vAPI.net.registerListeners = function() {
}
};

// https://bugs.chromium.org/p/chromium/issues/detail?id=129353
// https://github.com/gorhill/uBlock/issues/1497
// Expose websocket-based network requests to uBO's filtering engine,
// logger, etc.
// Counterpart of following block of code is found in "vapi-client.js" --
// search for "https://github.com/gorhill/uBlock/issues/1497".
//
// Once uBO 1.11.1 and uBO-Extra 2.12 are widespread, the image-based
// handling code can be removed.
var onBeforeWebsocketRequest = function(details) {
if ( (details.type !== 'image') &&
(details.method !== 'HEAD' || details.type !== 'xmlhttprequest')
) {
return;
}
var requestURL = details.url,
matches = /[?&]u(?:rl)?=([^&]+)/.exec(requestURL);
if ( matches === null ) { return; }
details.type = 'websocket';
details.url = decodeURIComponent(matches[1]);
var r = onBeforeRequestClient(details);
if ( r && r.cancel ) { return r; }
// Redirect to the provided URL, or a 1x1 data: URI if none provided.
matches = /[?&]r=([^&]+)/.exec(requestURL);
return {
redirectUrl: matches !== null ?
decodeURIComponent(matches[1]) :
'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
};
};

var onBeforeRequestClient = this.onBeforeRequest.callback;
var onBeforeRequest = validTypes.websocket
// modern Chromium/WebExtensions: type 'websocket' is supported
? function(details) {
normalizeRequestDetails(details);
return onBeforeRequestClient(details);
}
// legacy Chromium
: function(details) {
// https://github.com/gorhill/uBlock/issues/1497
if ( details.url.endsWith('ubofix=f41665f3028c7fd10eecf573336216d3') ) {
var r = onBeforeWebsocketRequest(details);
if ( r !== undefined ) { return r; }
}
normalizeRequestDetails(details);
return onBeforeRequestClient(details);
};
var onBeforeRequest = function(details) {
normalizeRequestDetails(details);
return onBeforeRequestClient(details);
};

// This is needed for Chromium 49-55.
var onBeforeSendHeaders = validTypes.csp_report
Expand All @@ -226,44 +193,16 @@ vAPI.net.registerListeners = function() {
var onHeadersReceivedClient = this.onHeadersReceived.callback,
onHeadersReceivedClientTypes = this.onHeadersReceived.types.slice(0),
onHeadersReceivedTypes = denormalizeTypes(onHeadersReceivedClientTypes);
var onHeadersReceived = validTypes.font
// modern Chromium/WebExtensions: type 'font' is supported
? function(details) {
normalizeRequestDetails(details);
if (
onHeadersReceivedClientTypes.length !== 0 &&
onHeadersReceivedClientTypes.indexOf(details.type) === -1
) {
return;
}
return onHeadersReceivedClient(details);
var onHeadersReceived = function(details) {
normalizeRequestDetails(details);
if (
onHeadersReceivedClientTypes.length !== 0 &&
onHeadersReceivedClientTypes.indexOf(details.type) === -1
) {
return;
}
// legacy Chromium
: function(details) {
normalizeRequestDetails(details);
// Hack to work around Chromium API limitations, where requests of
// type `font` are returned as `other`. For example, our normalization
// fail at transposing `other` into `font` for URLs which are outside
// what is expected. At least when headers are received we can check
// for content type `font/*`. Blocking at onHeadersReceived time is
// less worse than not blocking at all. Also, due to Chromium bug,
// `other` always becomes `object` when it can't be normalized into
// something else. Test case for "unfriendly" font URLs:
// https://www.google.com/fonts
if ( details.type === 'font' ) {
var r = onBeforeRequestClient(details);
if ( typeof r === 'object' && r.cancel === true ) {
return { cancel: true };
}
}
if (
onHeadersReceivedClientTypes.length !== 0 &&
onHeadersReceivedClientTypes.indexOf(details.type) === -1
) {
return;
}
return onHeadersReceivedClient(details);
};
return onHeadersReceivedClient(details);
};

var urls, types;

Expand Down
1 change: 0 additions & 1 deletion platform/edge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"manifest_version": 2,

"name": "uBlock Origin",
"version": "1.15.18",

"commands": {
"launch-element-zapper": {
Expand Down
8 changes: 8 additions & 0 deletions platform/edge/vapi-webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ vAPI.net.registerListeners = function() {
};

var normalizeRequestDetails = function(details) {
if (
details.tabId === vAPI.noTabId &&
typeof details.initiator === 'string'
) {
details.tabId = vAPI.anyTabId;
details.documentUrl = details.initiator;
}

var type = details.type;

// https://github.com/gorhill/uBlock/issues/1493
Expand Down
Loading

0 comments on commit 2a30892

Please sign in to comment.