-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to allow a specific document domain via no-csp-reports #1446
Comments
Why would you expect this? Why wouldn't the behavior you expect be similarly unexpected by somebody else? |
Maybe what you report here could have been debated back when the feature was developed. The problem at this point is that you are asking to change a behavior that exists ever since |
Well, in this commit introducing the I will have to further investigate when this was changed and why. |
This was changed in gorhill/uBlock@75659a3, because of gorhill/uBlock#3260. |
Given that this was a deliberate decision as per above commit/issue, I can't change back the behavior. |
This was not a feature request. But a request for more information about behavior and whether or not it might be possible to extend such rules. Currently, we have a policy behavior that goes from one extreme "Block all CSP " to another extreme "Block CSP but allow all CSP going to that third party" rather than allowing more control and a smoother transition: "Block all CSP, but trust some first-party against a specific third party". Just as lists give users control, rather than being blocked by rules that are too strict and too permissive - for which I assumed a lack of trust in the lists, why something like this could not be done directly by a custom rule in a local list. One could not trust a particular third party that could be used by the whole Internet except against a particular first party that the user fully trusts. That is why we have so much control over the lists, users can have control instead of being locked between two extremes. Having such a rule wide open goes against the privacy concern that leads uBlock to put in place this CSP feature–which is good and important in itself, just as is CSP, which reporting is and was made for. However, from what I saw when I dug into the code before opening the issue, it would be too hard to change as the configuration does not seem to be very flexible; especially for the number of people who would consider adding such exceptions and people who understand the role and implication of these policies. |
What you have in mind matches better a dynamic filtering rule, to be able to craft rules with both source and destination, i.e.:
But it's not something I see worth being added, especially given I have resisted adding other more common types than the ones already in there. |
Prerequisites
Description
Currently it seems it is not possible to allow a specific tab's hostname via custom rules without allowing the hostname of the CSP target for the report.
For example:
csp-ublock.vanille.bid
report-to
for CSP:example.com
This rule will not work:
This rule will work:
A specific URL where the issue occurs
https://csp-ublock.vanille.bid
Steps to Reproduce
<script>
was blocked and reported (otherwise analert()
will fire),My rules
, so) with:no-csp-reports: csp-ublock.vanille.bid false
no-csp-reports: example.com false
,Expected behavior:
I would expect to not fully allow a given CSP ingesting service, e.g.
example.com
(or a real one:ingest.sentry.io/api/security/
), rather be allowed to allow a given domain to send CSP reports to a specific target (e.g.csp-ublock.vanille.bid
to send toexample.com
, or as well as a rule that would allowvanille.bid
and its sub-domains to report toexample.com
).Actual behavior:
Only the third-party CSP report destination can be allowed rather than the first-party itself (or both combined as a
and
condition).Your environment
The text was updated successfully, but these errors were encountered: