Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Rule Count on the Save button is inconsistent when switching between the scopes #13

Closed
harshanvn opened this issue Oct 26, 2014 · 7 comments

Comments

@harshanvn
Copy link

AS said in the title, i have demonstrated the issue in the attached screenshot. Please review.
Using alpha 7 version..
rule count inconsistency

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Works as expected.

You un-whitelist (graylisted) locally a globally whitelisted request, so that means two rules:

  • 1 for the global whitelist
  • 1 for the local graylist

Remember: all rules from broader scopes are seen by narrower scopes. Without the second rule, github.com collector-cdn.github.com would be dark green.

@gorhill gorhill closed this as completed Oct 26, 2014
gorhill added a commit that referenced this issue Oct 26, 2014
@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Argh, wrong bug number, I meant to tag with #15.

@harshanvn
Copy link
Author

Not sure if i understood you correctly or if i explained correctly...

Step 1: Whitelist a local cell (so rule count will be 1)
Step 2: Whitelist the same in global cell (rule count increases to 2)

  • Experiment 1: If i save here, below 2 entries are inserted..
    • github.com collector-cdn.github.com script allow
    • * collector-cdn.github.com script allow

Step 3: revert step 1. Shouldn't rule count be 1 now?

  • Experiment 2: If i save here, below 2 entries are inserted to "Your rules"
    • * collector-cdn.github.com script allow
    • _github.com collector-cdn.github.com script _inherit**
  • Experiment 3: If only step2 performed, not step 1 and step3, below entry is saved..
    • * collector-cdn.github.com script allow

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Step 3: revert step 1. Shouldn't rule count be 1 now?

My answer is the same as here. I don't know how else to explain it more clearly.

I rather you explain to me how a cell in local scope can be graylisted without an explicit rule when the same cell is whitelisted in global scope.

@harshanvn
Copy link
Author

Ok. Can you tell me the meaning of inherit in the rule syntax. It was added when doing below steps..
rule count inconsistency 1

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Now you are bringing a different case, which requires a different explanation. You changed back the global rule to match the local one. Theoritically, the local one is not needed anymore. In practice though, uMatrix can't just go back a remove all the now apparently useless local overrides, because:

A user could quickly put back the global rule for whatever reason (removed by mistake, changed his mind, etc.), and in such case if uMatrix had removed all the apparently useless local rules, a user would silently lose the override in all local scopes where there is one.

inherit means the cell is graylisted and its block/allow state will be inherited from neighbouring cells just like in HTTPSB. inherit is the default when no block/allow rule are in action, but sometimes it has to be explicit to override a block/allow rule of the same cell in a broader scope.

I am trying to come up with a slight visual hint that a cell is explicitly graylisted -- there is currently none. I will be experimenting with some ideas of visual, as currently this can lead to confusion.

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Actually, I will also be renaming inherit to xy-inherit to reflect more accurately what it is about.

Noxgrim pushed a commit to Noxgrim/uMatrix that referenced this issue Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants