You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Only show a ruleset if at least one redirection took place. #13412
As I understand it, a ruleset appears in the UI if the page URL or the URLs of any secondary request match that ruleset. So this issue is already solved if we allow the condition "Possibly also if the redirect could have taken place if the request were made over HTTP." Is that right?
If we don't allow that condition, so that for example Freerangekitten.com would not appear in the UI if you directly visit https://freerangekitten.com , then you wouldn't be able to disable that ruleset, since it's not in the UI to toggle on or off.
I think that I can confirm @koops76 and @Bisaloo 's observations. Given a tabId, for each request, we look for rulesets which have matching target. Among these ruleset, if it is active (not default_off), we show it as an entry of "Stable rules"; otherwise, it is regarded as "Experimental rules". So, whether or not these rulesets make a redirection is not taken into account.
While this issue shouldn't be too difficult to fix, I am not sure what is the expected behavior for those default_off rulesets? By definition, they do not make redirections until an user activate them. However, if they do not show up, it might not be possible for non-technical user to activate these rulesets.
for(letrulesetofpotentiallyApplicable){newuristr=ruleset.apply(canonical_url);// apply() for each ruleset is very inefficientif(newuristr){activeRulesets.addRulesetToTab(details.tabId,ruleset);}}
All: thanks for the clarification. So is the point of this issue to take into account complications like exclusions and complex rules when deciding when to show a ruleset in the UI?
Thanks for the issue, and @cschanaj's explanation is correct: we show all potentially applicable rulesets, whether or not they are actually triggered on a page. This is behavior that is consistent with the legacy extension, and I believe should not be altered.
One reason for this is that for a particular page which no redirection has occurred, you may still want to disable (or enable) a potentially applicable ruleset.
#12325 (comment) is related, but instead of hiding the rulesets away in the menu, the suggestion is to limit the number you see in the badge to how many actual redirects happen due to HTTPS Everywhere. This seems most sensible to me.
Activity
jeremyn commentedon Oct 29, 2017
As I understand it, a ruleset appears in the UI if the page URL or the URLs of any secondary request match that ruleset. So this issue is already solved if we allow the condition "Possibly also if the redirect could have taken place if the request were made over HTTP." Is that right?
If we don't allow that condition, so that for example
Freerangekitten.comwould not appear in the UI if you directly visit https://freerangekitten.com , then you wouldn't be able to disable that ruleset, since it's not in the UI to toggle on or off.Bisaloo commentedon Oct 30, 2017
That's what I observed as well. It was pretty obvious with the google rulesets. Not so much now that some of them have been removed.
Note that this differs from the behaviour of the legacy HTTPS-Everywhere.
cschanaj commentedon Oct 30, 2017
I think that I can confirm @koops76 and @Bisaloo 's observations. Given a
tabId, for each request, we look for rulesets which have matchingtarget. Among theseruleset, if it isactive(notdefault_off), we show it as an entry of "Stable rules"; otherwise, it is regarded as "Experimental rules". So, whether or not these rulesets make a redirection is not taken into account.While this issue shouldn't be too difficult to fix, I am not sure what is the expected behavior for thosedefault_offrulesets? By definition, they do not make redirections until an user activate them. However, if they do not show up, it might not be possible for non-technical user to activate these rulesets.cc @Hainish @cowlicks
https-everywhere/chromium/background.js
Lines 285 to 290 in e958e4b
Possible fix (not tested)
jeremyn commentedon Oct 30, 2017
All: thanks for the clarification. So is the point of this issue to take into account complications like
exclusions and complexrules when deciding when to show a ruleset in the UI?Hainish commentedon Oct 31, 2017
Thanks for the issue, and @cschanaj's explanation is correct: we show all potentially applicable rulesets, whether or not they are actually triggered on a page. This is behavior that is consistent with the legacy extension, and I believe should not be altered.
One reason for this is that for a particular page which no redirection has occurred, you may still want to disable (or enable) a potentially applicable ruleset.
#12325 (comment) is related, but instead of hiding the rulesets away in the menu, the suggestion is to limit the number you see in the badge to how many actual redirects happen due to HTTPS Everywhere. This seems most sensible to me.
Hainish commentedon Oct 31, 2017
@koops76 yes, I think that would be useful, thank you.
Hainish commentedon Oct 31, 2017
@koops76 https://developer.chrome.com/extensions/webRequest
pipboy96 commentedon Sep 17, 2019
Duplicate of #17047.