Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/chrome/content/rules/Stack-Exchange.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- www.stackapps.com ==> Mismatched
- mathoverflow.com ==> No response (only a redirect to mathoverflow.net anyway)
- meta.*.stackexchange.com ==> Mismatched
- meta.*.stackexchange.com ==> Mismatched (now *.meta.stackexchange.com)
- blog.* ==> Mixed Active Content
- www.stackoverflow.blog ==> Mismatched

Expand Down Expand Up @@ -46,14 +46,16 @@
<test url="http://unix.stackexchange.com/" />
<test url="http://writers.stackexchange.com/" />

<!-- deeper domains cause certificate mismatch errors - there is also a downgrade rule below -->
<exclusion pattern="^http://([\w.-]+)\.([\w-]+)\.stackexchange\.com"/>
<!-- old child meta domains cause certificate mismatch errors -->
<exclusion pattern="^http://meta\.([\w-]+)\.stackexchange\.com"/>
<test url="http://meta.unix.stackexchange.com/" />
<test url="http://meta.opendata.stackexchange.com/" />
<test url="http://blog.gaming.stackexchange.com/" />
<test url="https://meta.unix.stackexchange.com/" />
<test url="https://meta.opendata.stackexchange.com/" />
<test url="https://blog.gaming.stackexchange.com/" />

<!-- gaming blog causes certificate mismatch errors -->
<exclusion pattern="^http://blog\.gaming\.stackexchange\.com"/>
<test url="http://blog.gaming.stackexchange.com/" />

<!-- but this one should not -->
<exclusion pattern="^https://qa\.sockets\.stackexchange\.com/" />
Expand Down Expand Up @@ -138,10 +140,10 @@
<securecookie host="^teststackoverflow\.com$" name=".+" />

<!-- Rules -->
<!-- https links from other pages to these will cause MCB for important elements, hence the downgrades -->
<rule from="^https://([\w.-]+)\.([\w-]+)\.stackexchange\.com/"
to="http://$1.$2.stackexchange.com/" downgrade="1" />

<!-- meta.* sites moved to *.meta - we can safely redirect to their new equivalents, which support https -->
<!-- details: https://meta.stackexchange.com/questions/292058/network-wide-https-its-time -->
<rule from="^https://meta\.([\w-]+)\.stackexchange\.com/" to="https://$1.meta.stackexchange.com/" />

<rule from="^http://www\.stackoverflow\.blog/" to="https://stackoverflow.blog/" />

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.

I think this rule can be removed. This domain is now properly handled with the trivial rewrite.

This is unrelated to the issue at hand though and it doesn't necessarily has to make it in this particular PR.

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.

The redirect from meta.* to *.meta doesn't happen in HTTPS though, in fact it can't because they don't have valid certificates for meta.*. So I'm okay with rewriting it here.

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.

My bad, something went wrong with my comment. I was talking about the rule line 148:

<rule from="^http://www\.stackoverflow\.blog/" to="https://stackoverflow.blog/" />

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's not handled by the trivial rewrite, because it's sending www to ^.

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.

Yes, what I meant is that https://www.stackoverflow.blog is valid now. Sure, it's 301 redirected to https://stackoverflow.blog/ but according to the ruleset style guidelines, we should use the trivial rewrite in this case, shouldn't we?

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.

Oh, I see what you mean. You're right, we shouldn't have this rule. However the whole ruleset needs review and we don't need to remove that in this pull request.


Expand Down