Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Bulk re-enabling of default_off="expired" rulesets. - #13177

Merged
J0WI merged 1 commit into
EFForg:masterfrom
bardiharborow:expired
Oct 24, 2017
Merged

J0WI merged 1 commit into
EFForg:masterfrom
bardiharborow:expired

Conversation

@bardiharborow

Copy link
Copy Markdown
Contributor

This PR re-enables all the rulesets from #13176 which require either only minimal simplification or straight re-enabling.



<securecookie host="^adsurve\.com$" name=".+" />
<securecookie host="^\w" name=".+" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "^\w" instead of ".+" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Bisaloo Bisaloo Oct 16, 2017 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bisaloo Only the first character should be alphabetic.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, better use .+.

@bardiharborow bardiharborow Oct 18, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks a bit dangerous. Can you provide a test url for it? Otherwise you should remove this target.

@ghost ghost Oct 24, 2017 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@J0WI

> 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link
Copy Markdown
Contributor Author

craftysyntax.com started timing out, so I've had to disable it again.

@J0WI

J0WI commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

@bardiharborow it would be easier to review for me if you keep you old commit, so I just have to review the new changes.

@J0WI
J0WI merged commit ecc16bc into EFForg:master Oct 24, 2017
@bardiharborow
bardiharborow deleted the expired branch October 25, 2017 03:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants