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

Further improve Steam ruleset #15088

Merged
merged 1 commit into from
Apr 7, 2018
Merged

Further improve Steam ruleset #15088

merged 1 commit into from
Apr 7, 2018

Conversation

xPaw
Copy link
Contributor

@xPaw xPaw commented Apr 6, 2018

@xPaw xPaw changed the title Remove https->https redirects in Steam ruleset Further improve Steam ruleset Apr 6, 2018
@xPaw
Copy link
Contributor Author

xPaw commented Apr 6, 2018

cc @Bisaloo @apaloma

to="https://store.steampowered.com/" />

<rule from="^https?://((cdn|cdn\.store|www)\.)?steampowered\.com/"
<rule from="^http://((cdn|storefront|www)\.)?steampowered\.com/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

steampowered.com is not listed in your targets

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Tests didn't catch that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a rule to cover /v/gfx before, but CI complained there was no test for it (even though there was). Do tests/rules work for covering paths and not just domains?

Also /v/gfx isn't directly used anywhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do tests/rules work for covering paths and not just domains?

Yes, they do. Since you are force pushing, I can't really tell what was wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed it again so you can take a look.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's because it's already rewritten by the previous rule. You should try switching L40 and L43. That should help.

If that does not work, you will need to use a stricter rule but let's try this first.

<target host="help.steampowered.com" />
<test url="http://help.steampowered.com/" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

This already exists as an implicit test url. Please remove all similar test urls.

You can read more here: https://github.com/EFForg/https-everywhere/blob/master/ruleset-testing.md

@cschanaj, didn't the recent change in travis tests prevent this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Bisaloo #14660 hasn't been merged yet

@@ -7,47 +7,56 @@
<test url="http://partner.steam-api.com/" />

<target host="steamcommunity.com" />
<test url="http://steamcommunity.com/" />
<test url="http://steamcommunity.com/broadcast/getbroadcastmpd/?steamid=76561197966726415" />
<target host="*.steamcommunity.com" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a very small number of subdomains for this domain. Could you list them all? We are discouraging the use of wildcards.

@xPaw
Copy link
Contributor Author

xPaw commented Apr 6, 2018

All fixed up.

<target host="partner.steamgames.com" />

<target host="steampowered.com" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you sort the subdomains according to our contributing guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, done.

to="https://steamcommunity.com/" />

<rule from="^http://(cdn\.steamcommunity|community\.akamai\.steamstatic|community\.edgecast\.steamstatic)\.com/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This rule doesn't cover the URL you posted?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@Bisaloo Bisaloo Apr 6, 2018

Choose a reason for hiding this comment

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

We usually try to avoid this because it makes rulesets fragile. As soon as they change their CDN provider, it breaks things.

If @apaloma can get someone from Valve to officially comment that they reviewed the complex rules, I am okay with doing an exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pinged him about this. But subdomains cdn.steampowered.com, cdn.store.steampowered.com and cdn.steamcommunity.com aren't really used. They use akamai.steamstatic.com and akamaihd.com variants on store and community.

Copy link

Choose a reason for hiding this comment

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

Yes, @Bisaloo I work for Valve (http://www.valvesoftware.com/email.php?recipient=Tony+Paloma) and provided @xPaw with rules here: #15087 (comment)

It is possible we change CDN at some point in the future, but unlikely that occurs before we're 100% HTTPS.

@Bisaloo
Copy link
Collaborator

Bisaloo commented Apr 6, 2018

This does not seem safe. Please remove all complex rules (excepted redirected between www and ^).

If steam is still rolling out HTTPS support, we can add this a later time in a way that doesn't risk breaking the website for many users.

@xPaw
Copy link
Contributor Author

xPaw commented Apr 6, 2018

@Bisaloo these rules are implemented after talking to a Valve employee (@apaloma), hence most of the CDN redirects.

@Bisaloo
Copy link
Collaborator

Bisaloo commented Apr 6, 2018

Well, I checked 3 of them and 2 were already wrong. :/

How do you know @apaloma is a Valve employee? It is not listed on their profile. If that is indeed the case, please re-check the rewrites.

@xPaw
Copy link
Contributor Author

xPaw commented Apr 6, 2018

I can add the v/gfx rewrite back in if you answer the question about tests. And the other URL you posted doesn't make much sense, care to elaborate?

I know he's an employee because of a contact outside of Github.

@Bisaloo Bisaloo closed this Apr 6, 2018
@Bisaloo Bisaloo reopened this Apr 6, 2018
@Bisaloo Bisaloo merged commit 79afd33 into EFForg:master Apr 7, 2018
@Bisaloo
Copy link
Collaborator

Bisaloo commented Apr 7, 2018

For the record, I disagree with merging smaller rulesets into a big complex ruleset. I makes further updates much more of a pain. In my opinion, we should always try to stick to one domain per ruleset.

However, since this is already a big improvement compared to the current master version, I am merging it as it is.

Thank you @xPaw and @apaloma for you quick responses!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants