You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
<securecookie host=".+" name=".+" />
^ ^
possibly some spaces here (some badly formated ones)
^
this space does not necessarily exist, e.g. \s* should be better
FYI, here is a sample regex used by hsts-prune for your reference. e.g
@koops76 <securecookie host=".+" name=".+" /> are matched by the 1st regular expression, but it won't be replaced (the replacement does not change anything). You may permute the combination of ., .+ and .* to exclude (.+, .+). But they are just the same IMHO.
btw, from which directory should I run your script?
@koops76 since you've said that you will be modifying the script, IMHO you can rewrite the files in-place. This will avoid unnecessary workload and possible human errors in the operations.
Besides, it is also fine not to modify the whitelist with your script, since Hanish will have to whitelist the files anyway. A bonus of this is that you can reduce the program to a sed script. And we will have less false-listing in the whitelist. (optional)
@koops76 I just think that this change is a cosmetic one (related to #10378), so minimal works should be done on making a script. Please feel free to continue your work on the script in your preferred way.
normsc.sed is a sed script I have made and it seems that only 200+ files need whitelisting from rules-test, see list-failed-rules-test.txt. (Since I have already made the script, I prefer to leave it here AS-IS).
Activity
cschanaj commentedon Aug 14, 2017
@koops76 AFAIK
FYI, here is a sample
regexused byhsts-prunefor your reference. e.gAnd I recommend using a separate
regexfor each orders ofnameandhost. It is much easier to read.Not really, e.g.
^\wdoes not match.example.combut.+does. Also,rules.js#L57does not include^\w.cschanaj commentedon Aug 14, 2017
@koops76 please also note the spaces before the
quoteand consider splitting the for each orders ofnameandhost. thanks!!cschanaj commentedon Aug 14, 2017
exactly. you can insert
\s*right before the opening quotes.cschanaj commentedon Aug 14, 2017
ok. A minor issues, the regex you use might rewrite commented
securecookieas well. do you mind if I fix that as well? e.g.<!-- <securecookie ... /> -->cschanaj commentedon Aug 14, 2017
@koops76 please have a look
Source
P.S. I seldom do nodejs but I guess this will work. (at least the regex 😄 )
cschanaj commentedon Aug 14, 2017
Just updated to make sure
hostalways go beforename.cschanaj commentedon Aug 14, 2017
Thing like
SecureCookie,Host,NAMEshould failsrules-test. The same hold true ifsecurecookiehas doublehostornameas specified in https://github.com/EFForg/https-everywhere/blob/master/utils/relaxng.xml#L49@koops76 modified for simplicity. thanks!
cschanaj commentedon Aug 14, 2017
@koops76
<securecookie host=".+" name=".+" />are matched by the 1st regular expression, but it won't be replaced (the replacement does not change anything). You may permute the combination of.,.+and.*to exclude (.+,.+). But they are just the same IMHO.btw, from which directory should I run your script?cschanaj commentedon Aug 14, 2017
@koops76 Would you modify your script on GIST for Hainish to run it later?
cschanaj commentedon Aug 14, 2017
@koops76 not the same as https://gist.github.com/cschanaj/eb0de61c00389cfccb93cd78381a7b8e? the leading
\n([ \t]*)and\s*?\navoid commentedsecurecookieto be rewritten, you shouldn't remove that.Besides, https://gist.github.com/koops76/14db6c6c1250eadc98644cff51e7add7#file-normalize-securecookie-js-L21 match
host="".If possible, please replace them with the ones I proposed.
cschanaj commentedon Aug 15, 2017
@koops76 since you've said that you will be modifying the script, IMHO you can rewrite the files in-place. This will avoid unnecessary workload and possible human errors in the operations.
Besides, it is also fine not to modify the whitelist with your script, since Hanish will have to whitelist the files anyway. A bonus of this is that you can reduce the program to a
sedscript. And we will have less false-listing in the whitelist. (optional)cschanaj commentedon Aug 15, 2017
@koops76 I just think that this change is a cosmetic one (related to #10378), so minimal works should be done on making a script. Please feel free to continue your work on the script in your preferred way.
normsc.sedis asedscript I have made and it seems that only 200+ files need whitelisting fromrules-test, seelist-failed-rules-test.txt. (Since I have already made the script, I prefer to leave it here AS-IS).gloomy-ghost commentedon Aug 26, 2017
I created a similar PR before, see #7892