// The chain choice must survive the whole round trip, and only be asked when // firmware genuinely supports both chains. // // This is the invariant the installer depends on: // pick in the installer page -> stored on the origin -> the pointer sends the // user to that chain's page -> that page runs that chain's exploit // // The property this file pins hardest: BOTH chain pages are always cached, so a // chain switch is one storage key and touches nothing in the AppCache. Every // earlier failure in this area came from mechanisms that tried to make the cache // depend on the choice. const assert = require('node:assert/strict'); const fs = require('node:fs'); const vm = require('node:vm'); const FW = [ // fw, poops, relapse (as the installer page computes it) ['7.00', true, true], ['7.61', true, true], ['8.60', true, true], ['9.00', true, true], ['9.05', true, false], ['9.60', true, true], ['10.01', true, true], ['11.00', true, true], ['11.40', true, false], ['12.00', true, true], ['12.02', false, true], ['12.70', false, true], ['13.00', false, true], ['13.60', false, true], ]; /* ---- installer page: frontend/installer-page/index.html ------------------- */ function loadPage(options) { const html = fs.readFileSync('frontend/installer-page/index.html', 'utf8'); const code = html.match(/