-
Notifications
You must be signed in to change notification settings - Fork 14
Work around with HTTPSE breaking ruleset format changes #3
Conversation
@cschanaj, could you use GitHub auto-closing feature please? It works across folders https://help.github.com/articles/closing-issues-using-keywords/ Also @diracdeltas, not sure if you were automatically pinged on this. |
Thanks, I did not see this. Will look at it today. Does this address brave/browser-laptop#10976 (comment) ? |
scripts/preloadHTTPSE.js
Outdated
const levelup = require('level') | ||
const rmDir = require('./util').rmDir | ||
const exec = require('child_process').exec | ||
|
||
const xpiVersion = '5.2.21' // Manually update this to latest version | ||
const xpiVersion = '2017.12.6' // Manually update this to latest version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also bump the version in package.json
to 6.0.0
. this creates a new ruleset download in S3 instead of overwriting the current one (safer in case the new one has breaking changes).
scripts/preloadHTTPSE.js
Outdated
} | ||
|
||
console.log('Writing httpse.json') | ||
fs.writeFileSync('./out/httpse.json', JSON.stringify(rulesets), 'utf8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need to create httpse.json
since it's used on the Brave desktop browser (only mobile uses leveldb)
scripts/preloadHTTPSE.js
Outdated
@@ -33,84 +32,40 @@ const downloadRulesets = (dir, cb) => { | |||
} | |||
|
|||
const buildDataFiles = () => { | |||
// Manually exclude sites that are broken until they are fixed in the next | |||
// HTTPS Everywhere release. | |||
const exclusions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to delete these exclusions unless all of these rulesets are verified to be fixed in HTTPS Everywhere upstream
@diracdeltas I've made corresponding changes in my PR. Do I need update the |
@cschanaj would be great to update it to |
@diracdeltas please check. thanks! PS. The original JSON format is not that straight forward...
|
} | ||
|
||
for (const ruleset of rulesets) { | ||
if (!ruleset.default_off && !ruleset.platform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original code include default_off
and platform
ruleset in httpse.json
, which is gone now.
'Cisco.com (partial)': 'breaks http://www.cisco.com/c/m/en_us/training-events/events-webinars/techwise-tv/listings.html', | ||
'GQ.com (partial)': 'mixed content on gq.com', | ||
'Where 2 Get It (partial)': 'maps missing on http://us.coopertire.com/Customer-Care/Dealer-Locator.aspx?form=locator_search&addressline=92346', | ||
'Thompson Hotels.com (partial)': 'missing stylesheets on http://www.thompsonhotels.com/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for going through and re-mapping these!
Needed for brave/https-everywhere-builder#3 Note that this is a breaking change from HTTPS Everywhere 5.x's ruleset format.
@cschanaj yup, there's no reason to have the HTTPSE.json be as complicated as it used to be. i opened brave/browser-laptop#13133 so you can simplify it somewhat by flattening out the so the new schema can be:
|
scripts/preloadHTTPSE.js
Outdated
}) | ||
} | ||
|
||
if (ruleset.securecookie) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have plans to use securecookie
in browser-laptop so this can be omitted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for submitting a PR upstream!! I have remove the securecookie
properties and simplified the schema in 31d9b8f.
This works great, thank you! Please run |
@diracdeltas done. thanks!! |
@bsclifton this can be squashed and merged :). once that is done, please run |
- Update preloadHTTPSE.js - Update package.json - Bump version in package.json to 6.0.0 - Update scripts/preloadHTTPSE.json - Update to HTTPS Everywhere 2018.1.29 - Changes as per npm run lint - Update scripts/preloadHTTPSE.js - Simplify HTTPSE.json schema - Update package-lock.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased / squashed per comments by @diracdeltas 😄
@diracdeltas built + uploaded 👍 |
Needed for brave/https-everywhere-builder#3 Note that this is a breaking change from HTTPS Everywhere 5.x's ruleset format.
pushed to prod with https://jenkins.brave.com/view/laptop%20updates/job/https-everywhere-builder/10/ |
Needed for brave/https-everywhere-builder#3 Note that this is a breaking change from HTTPS Everywhere 5.x's ruleset format.
Needed for brave/https-everywhere-builder#3 Note that this is a breaking change from HTTPS Everywhere 5.x's ruleset format.
Close EFForg/https-everywhere/issues/12590, Close brave/browser-laptop/issues/10976
Needed for brave/browser-laptop/issues/11598
Hopefully I did not break anything...