Repository navigation
Bulk re-enabling of default_off="expired" rulesets. - #13177
Conversation
|
|
||
|
|
||
| <securecookie host="^adsurve\.com$" name=".+" /> | ||
| <securecookie host="^\w" name=".+" /> |
There was a problem hiding this comment.
why "^\w" instead of ".+" ?
There was a problem hiding this comment.
To be quite honest, I don't really understand what I'm doing with securecookies, but as I understand it ^\w secures cookies specific to a particular host, and .+ secures domain-wide cookies that might be accessed by HTTP-only subdomains. This could be very wrong though. In this instance I haven't actually done any cookie testing and therefore I've tried to match the existing behaviour as closely as possible.
There was a problem hiding this comment.
As I understand it, .+ secures cookies for all targets and ^\w secures cookies for all targets with only alphabetic characters.
So they should be functionally equivalent (as long as you don't have digits in your targets) but ^\w won't be read as a trivial securecookie rule by the rewriter.
Only subdomains listed as targets can be affected by securecookie and rewrite rules.
But that's just my take on it, feel free to wait for another opinion.
There was a problem hiding this comment.
@Bisaloo Only the first character should be alphabetic.
There was a problem hiding this comment.
As I understand it, .+ secures cookies for all targets and ^\w secures cookies for all targets with only alphabetic characters.
@Bisaloo ^\w matches any alphanumeric character including the underscore. This means that all cookies will be accepted, except those starting with dots – however it appears that my understanding of the difference between example.comand .example.com no longer applies. Perhaps @J0WI can clarify.
Only subdomains listed as targets can be affected by securecookie and rewrite rules.
Non-HTTPS subdomains that are not listed as targets may depend on cookies set on the root domain, that we secure and stop them from accessing.
I've made the change to this ruleset though.
There was a problem hiding this comment.
About the leading dot, see https://www.eff.org/https-everywhere/rulesets#secure-cookies
Non-HTTPS subdomains that are not listed as targets may depend on cookies set on the root domain, that we secure and stop them from accessing.
True but that doesn't change the fact that ^\w and .+ should be functionally equivalent.
| to="https://www.digitalnewsagency.com/" /> | ||
|
|
||
| <rule from="^http://dna-bucket-dna\.cf\.rawcdn\.com/" | ||
| to="https://df7r7v78mcbtc.cloudfront.net/" /> |
There was a problem hiding this comment.
That looks a bit dangerous. Can you provide a test url for it? Otherwise you should remove this target.
There was a problem hiding this comment.
> nslookup dna-bucket-dna.cf.rawcdn.com
Server: UnKnown
Address: 192.168.0.1
Non-authoritative answer:
Name: df7r7v78mcbtc.cloudfront.net
Addresses: 13.33.23.17
13.33.23.146
13.33.23.85
13.33.23.82
13.33.23.240
13.33.23.121
13.33.23.71
13.33.23.35
Aliases: dna-bucket-dna.cf.rawcdn.com
There was a problem hiding this comment.
@J0WI yeah, I'd actually initially removed it, but I added it back because I realised it's valid and it's a little beyond the scope of this PR to mess with individual rulesets too much. I've added a test URL, and I don't think there are any issues with this rewrite (possibly it's for third-parties, as I haven't seen any mixedcontent issues causing a need for the rewrite on the main site).
|
|
|
@bardiharborow it would be easier to review for me if you keep you old commit, so I just have to review the new changes. |
This PR re-enables all the rulesets from #13176 which require either only minimal simplification or straight re-enabling.