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

[Wolfram.com] Update rulesets. #12386

Merged
merged 1 commit into from
Oct 13, 2017
Merged

[Wolfram.com] Update rulesets. #12386

merged 1 commit into from
Oct 13, 2017

Conversation

bardiharborow
Copy link
Contributor

No description provided.

@Hainish Hainish added the top-10k label Sep 2, 2017
<target host="www4d.wolframalpha.com" />
<target host="www4f.wolframalpha.com" />
<target host="www5a.wolframalpha.com" />
<target host="www5b.wolframalpha.com" />
Copy link
Contributor

Choose a reason for hiding this comment

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

These targets are redundant to the wildcard. Please transform them into test urls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The wildcard regex only covers ^http://(www[0-9][0-9]\.)?wolframalpha\.com/. Wolfram Alpha does not have HTTPS support on all subdomains, and hence replacing these with test urls would require the list to also be compacted into the regex, a practice that to my understanding is explicitly discouraged (?). It's not an ideal overlap, but this PR cuts the number of Wolfram rulesets in the whitelist from 3 to 1.

Copy link
Contributor

Choose a reason for hiding this comment

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

This ruleset contains <target host="*.wolframalpha.com" /> and <rule from="^http:" to="https:" /> so it will rewrite anything to https. But you also listed some explicit targets like www5b.wolframalpha.com and special rewrites.
This is confusing and I think it does not behave like you planned.

So I would list all targets, keep the generic redirect and remove the wildcard target, or use a wildcard target with specific redirect rules and test urls.

Copy link
Contributor Author

@bardiharborow bardiharborow Oct 13, 2017

Choose a reason for hiding this comment

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

I think it does not behave like you planned.

You are very correct, such a rule would redirect all subdomains to HTTPS indiscriminately. Scarily, that seems to have also been the behavior of the previous ruleset, and probably explains why I copied it without thinking.

- volunteer (sha1)
- www-cn (sha1)
- www-tw (sha1)
- www[0-9][0-9] (http only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please group by error type and be more precise.

@bardiharborow
Copy link
Contributor Author

@J0WI I feel like my comments frequently fail your expectations. Is there a checklist somewhere I can start running through, or is it mostly just experience?

@J0WI
Copy link
Contributor

J0WI commented Oct 4, 2017

I feel like my comments frequently fail your expectations. Is there a checklist somewhere I can start running through, or is it mostly just experience?

We have our CONTRIBUTING.md and some projects like #9906

@J0WI
Copy link
Contributor

J0WI commented Oct 13, 2017

LGTM now, Thanks!

@J0WI J0WI merged commit fe0607e into EFForg:master Oct 13, 2017
@bardiharborow bardiharborow deleted the wolfram branch October 14, 2017 02:41
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.

3 participants