Skip to content

Commit f3c7b3d

Browse files
author
MB
committed
[Lenovo] Enumerate, sort, squish, add tests, add coverage, enable
1 parent d9f9646 commit f3c7b3d

File tree

2 files changed

+120
-39
lines changed

2 files changed

+120
-39
lines changed

src/chrome/content/rules/Lenovo.xml

Lines changed: 119 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,37 @@
2323
2424
- lenovo.com subdomains:
2525
26-
- blog *
26+
- blog ¹
2727
- consumersupport **
28-
- news (handshake fails)
29-
- social *
30-
- support **
28+
- news ³
29+
- www.partnerinfo ¹
30+
- www2.partnerinfo ¹
31+
- partners ¹
32+
- social ⁵
3133
3234
- training.lenovo.partner-management.com
3335
34-
* Redirects to www.lenovoblogs.com; expired 2011-10-05, CN: localhost.localdomain
35-
** Times out
36+
¹ Refused
37+
** 504, Akamai
38+
³ Show www.tvweeklynow.com
39+
⁵ Dropped
3640
3741
3842
Problematic domains:
3943
40-
- lenovo.com (cert is only valid for www)
41-
- forum.lenovo.com *
44+
- lenovo.com ¹
45+
- apps.lenovo.com ¹
46+
- forum.lenovo.com ¹
4247
- outlet.lenovo.com ($ 404s, some pages redirect to http, some paths work)
48+
- ovp.lenovo.com ³
49+
- shareit.lenovo.com ¹
50+
4351
- (www.)lenovovision.com **
4452
- (www.)thinkpad.com **
4553
54+
¹ Mismatched
4655
* Mismatched, CN: secure01.lithium.com
56+
³ Missing certificate chain, see https://whatsmychaincert.com
4757
** Times out
4858
4959
@@ -68,34 +78,96 @@
6878
- (www.)lenovovision.com (→ www.lenovo.com)
6979
- (www.)thinkpad.com (→ www.lenovo.com)
7080
81+
82+
Insecure cookies are set for these hosts and domains:
83+
84+
- ovp.lenovo.com
85+
- support.lenovo.com
86+
- .support.lenovo.com
87+
88+
89+
Mixed content:
90+
91+
- Images, on:
92+
93+
- forums from www.msfn.org
94+
- forums from lenovoblogs.com
95+
- www.lenovo.com from $self
96+
- www.lenovo.com from shop.lenovo.com
97+
98+
- favicon on www.lenovo.com from $self
99+
100+
- Bug on forums from lenovoblogs.112.2o7.net
101+
71102
-->
72-
<ruleset name="Lenovo (partial)" platform="mixedcontent" default_off="Needs ruleset tests">
103+
<ruleset name="Lenovo (partial)">
73104

74-
<target host="lenovo.co.uk" />
75-
<target host="www.lenovo.co.uk" />
76-
<target host="lenovo.com" />
77-
<target host="*.lenovo.com" />
105+
<!-- Direct rewrites:
106+
-->
107+
<target host="checkout.lenovo.com" />
108+
<target host="download.lenovo.com" />
109+
<target host="forums.lenovo.com" />
110+
<target host="outlet.lenovo.com" />
111+
<target host="s.lenovo.com" />
112+
<target host="support.lenovo.com" />
78113
<!--
79114
https://mail1.eff.org/pipermail/https-everywhere-rules/2012-April/001098.html
80115
81116
Redirects that 404. Destinations don't support https:
82117
-->
83118
<exclusion pattern="^http://www\.lenovo\.com/(?:support|training)/" />
119+
120+
<test url="http://www.lenovo.com/support/" />
121+
<test url="http://www.lenovo.com/training/" />
122+
123+
<!--
124+
Redirects to http:
125+
-->
126+
<exclusion pattern="http://shop\.lenovo\.com/\w\w/\w\w/services-warranty(?:$|\?|/)" />
84127
<!--
85128
https://trac.torproject.org/projects/tor/ticket/9056
86129
87130
$ no longer works, some pages redirect to http:
88131
-->
89-
<exclusion pattern="^http://outlet\.lenovo\.com/(?!.+/images/|.+/js/|.+/seutil\.workflow:LoadCombinedResource|ISS_Static/|SEUILibrary/)" />
132+
<!--exclusion pattern="^http://outlet\.lenovo\.com/outlet_us/$" /-->
90133
<!--
91-
Redirects to http:
92-
-->
93-
<exclusion pattern="http://shop\.lenovo\.com/\w\w/\w\w/services-warranty(?:$|\?|/)" />
134+
Exceptions:
135+
-->
136+
<exclusion pattern="^http://outlet\.lenovo\.com/(?!.+/images/|.+/js/|.+/seutil\.workflow:LoadCombinedResource|ISS_Static/|SEUILibrary/)" />
137+
138+
139+
<!-- Complications:
140+
-->
141+
<target host="lenovo.co.uk" />
142+
<target host="www.lenovo.co.uk" />
143+
<target host="thinkpad.com" />
144+
<target host="lenovo.com" />
145+
<target host="forum.lenovo.com" />
146+
<target host="shop.lenovo.com" />
147+
<target host="www.lenovo.com" />
94148
<target host="lenovovision.com" />
95149
<target host="www.lenovovision.com" />
96-
<target host="thinkpad.com" />
97150
<target host="www.thinkpad.com" />
98151

152+
<!-- Downgrades:
153+
-->
154+
<target host="blog.lenovo.com" />
155+
<target host="consumersupport.lenovo.com" />
156+
<target host="news.lenovo.com" />
157+
<target host="ovp.lenovo.com" />
158+
<target host="social.lenovo.com" />
159+
160+
161+
<!-- Not secured by server:
162+
-->
163+
<securecookie host="\.lenovo\.com$" name="^VISITORID$" />
164+
<securecookie host="forums\.lenovo\.com$" name="^(LiSESSIONID|LithiumUserInfo|LithiumUserSecure|LithiumVisitor)$" />
165+
<securecookie host="^ovp\.lenovo\.com$" name="^JSESSIONID$" />
166+
<securecookie host="^support\.lenovo\.com$" name="^esupport#lang$" />
167+
<securecookie host="^\.support\.lenovo\.com$" name="^esupport#lang1$" />
168+
169+
<securecookie host="\.lenovo\.com$" name="VISITORID" />
170+
<securecookie host="(?:forums|\.?support)\.lenovo\.com$" name=".+" />
99171

100172
<!-- Tracking cookies:
101173
These have been observed to break partner referral links and so are
@@ -105,66 +177,75 @@
105177
-->
106178

107179

108-
<rule from="^http://(?:www\.)?lenovo\.co\.uk/?$"
180+
<rule from="^http://(?:www\.)?lenovo\.co\.uk/$"
109181
to="https://www.lenovo.com/uk/en/" />
110182

111-
<!-- https://trac.torproject.org/projects/tor/ticket/8715
112-
113-
International domains fail to redirect properly:
114-
-->
115-
<rule from="^http://(?:www\.)?lenovo\.com(?::80)?/(?!us)(\w\w)/?(?:\?.*)?$"
116-
to="https://www.lenovo.com/$1/$1/" />
117-
118183
<!-- 404s as-is:
119184
-->
120185
<rule from="^http://(?:www\.)?lenovo\.com/depotstatus/?$"
121186
to="https://download.lenovo.com/lenovo/content/vru/depotstatus.html" />
122187

188+
<test url="http://lenovo.com/depotstatus" />
189+
<test url="http://lenovo.com/depotstatus/" />
190+
<test url="http://www.lenovo.com/depotstatus" />
191+
123192
<!-- 404s as-is:
124193
-->
125194
<rule from="^http://(?:www\.)?lenovo\.com/friendsandfamily/?$"
126195
to="https://shop.lenovo.com/SEUILibrary/controller/Lenovo:EnterStdAffinity?affinity=lenovofamily&amp;ConfigContext=StdAffinityPortal" />
127196

197+
<test url="http://lenovo.com/friendsandfamily" />
198+
<test url="http://lenovo.com/friendsandfamily/" />
199+
<test url="http://www.lenovo.com/friendsandfamily/" />
200+
128201
<!-- https://trac.torproject.org/projects/tor/ticket/6604
129202
130203
thinkpad.com redirects to www.lenovo.com/link/redirect.www.lenovo.com/www.thinkpad.com/,
131204
which 404s over https but redirects like so over http:
132205
-->
133-
<rule from="^http://(?:(?:www\.)?lenovo\.com/link/redirect\.www\.lenovo\.com/)?(?:www\.)?thinkpad\.com/(?:.*)"
206+
<rule from="^http://(?:(?:www\.)?lenovo\.com/link/redirect\.www\.lenovo\.com/)?(?:www\.)?thinkpad\.com/.*"
134207
to="https://www.lenovo.com/us/en/?cid=SEO-thinkpadcom" />
135208

136209
<rule from="^http://lenovo\.com/"
137210
to="https://www.lenovo.com/" />
138211

139-
<!-- 404s as-is:
212+
<rule from="^http://forum\.lenovo\.com/"
213+
to="https://forums.lenovo.com/" />
214+
215+
<!-- Loops as-is:
140216
-->
141217
<rule from="^http:///shop\.lenovo\.com/us/?$"
142-
to="https://www.lenovo.com/products/us/desktop/essential/c-series" />
218+
to="https://www.lenovo.com/us/en/?redir=y&amp;redirsrc=1" />
143219

144-
<rule from="^http://(checkout|download|outlet|s|shop|www)\.lenovo\.com/"
145-
to="https://$1.lenovo.com/"/>
146-
147-
<rule from="^http://forums?\.lenovo\.com/"
148-
to="https://forums.lenovo.com/" />
220+
<test url="http:///shop.lenovo.com/us" />
221+
<test url="http:///shop.lenovo.com/us/" />
149222

150223
<!-- https://mail1.eff.org/pipermail/https-everywhere-rules/2012-June/001189.html
151224
152225
shop.lenovo points here:
153226
-->
154-
<rule from="^http://(?:www\.)?lenovovision\.com/(?:.*)"
227+
<rule from="^http://(?:www\.)?lenovovision\.com/.*"
155228
to="https://www.lenovo.com/" />
156229

230+
<test url="http://lenovovision.com/foo" />
231+
232+
233+
<rule from="^http:"
234+
to="https:" />
235+
236+
157237
<!-- https://mail1.eff.org/pipermail/https-everywhere-rules/2012-April/001098.html
158238
159239
training redirects to training.lenovo.partner-management.com:
160240
-->
161241
<rule from="^https://www\.lenovo\.com/training/"
162242
to="http://www.lenovo.com/training/" downgrade="1" />
163243

244+
<test url="https://www.lenovo.com/training/" />
245+
164246
<!-- - Social just redirects to blog
165-
- Haven't seen blog nor support links, but just in case.
166-
-->
167-
<rule from="^https://(blog|(?:consumer)?support|news|social)\.lenovo\.com/"
247+
-->
248+
<rule from="^https://(blog|consumersupport|news|ovp|www\.partnerinfo|social)\.lenovo\.com/"
168249
to="http://$1.lenovo.com/" downgrade="1" />
169250

170251
</ruleset>

utils/ruleset-coverage-whitelist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7024,7 +7024,7 @@ e68e273cc76ef330863f1e810aa136ec203f6cb6ff83573773f596f665da3a74 Lektorium.tv.x
70247024
9603cf55cc449dc1f41d0f4a8d9c77a6793552d98dace243a5f8dbf67b8c71d9 Le_Monde.fr.xml
70257025
c654e688d0010234dc5bb91f672333455c7ca1235884add140d3d4f9d17f3173 Lendo.se.xml
70267026
ee3473e024eda007335e6c7eeb73d6bc1eacd82f8664a24890d999fdd3b38e5a Lenos-Software.xml
7027-
7c225b02500d53e726b9785088694b4b61f5bd881812e19fa8f6c535b2591ef5 Lenovo.xml
7027+
3ab491e437969169964f9a74a37b090ffd42e139f5543ad23245faf1d3bf50af Lenovo.xml
70287028
d52e011483f8a5c89f93c1ab0e22ec93f6cffd51bdb9cd160e9eadbb257acd68 LensRentals.xml
70297029
07638a160417839ec68f1c62683aba3dc5e7c98935f4dc7600bfa8cf50cdbcd4 Leo.org.xml
70307030
0db5c093f93156a5764c5d52f71bf860cfee58c6bb7be818f235a9061ac8801b Leroy_Farmer_City_Press.xml

0 commit comments

Comments
 (0)