v3.32.7: drop the pySim JSON disclosure from the file manager
The decoded view is the client-side EF decoder's table over the raw read's bytes. The collapsed "pySim JSON (server)" block was an unrelated second decode - opening it ran another /api/read with mode 'decoded' (pySim's read_binary_decoded/read_records_decoded on the card) - and it existed only when our decoder covered the file, so it could not serve as a cross-check where one would matter. /api/read keeps mode 'decoded' for API callers. Help, READMEs and the project notes now state the table is built in the browser from the same raw bytes; ef_decode.test.js pins the view's output and that no mode 'decoded' read remains in the PWA. 1016 Python + 955 frontend green; simple-v465.
This commit is contained in:
@@ -376,7 +376,10 @@ test('file manager decoded view renders fields, not JSON', () => {
|
||||
const out = pysimFsDecodedHtml({ name: 'EF.IMSI', fid: null }, { success: true, data: '082982608200002080' });
|
||||
assert.match(out, /IMSI/);
|
||||
assert.match(out, /228062800000208/);
|
||||
assert.match(out, /pySim JSON \(server\)/);
|
||||
// The view is the client-side decoder's table only (v3.32.7): the
|
||||
// server-side pySim JSON disclosure is gone - it was an unrelated second
|
||||
// read of the card, not an input to this decode.
|
||||
assert.doesNotMatch(out, /pySim JSON/);
|
||||
assert.doesNotMatch(out, /\{"imsi"/);
|
||||
// the label column is content-sized, not a fixed 10rem block
|
||||
assert.match(out, /grid-template-columns:max-content 1fr/);
|
||||
@@ -387,6 +390,15 @@ test('file manager decoded view renders fields, not JSON', () => {
|
||||
assert.match(raw, /0011/);
|
||||
});
|
||||
|
||||
test('the file manager never requests the server-side decode', () => {
|
||||
// The decoded table is client-side (the raw read's bytes); the pySim JSON
|
||||
// lookup - a second /api/read with mode 'decoded' - is gone (v3.32.7).
|
||||
assert.ok(!html.includes("mode = 'decoded'"));
|
||||
assert.ok(!html.includes('pysimFsLoadPySimJson'));
|
||||
assert.ok(!html.includes('pysim-fs-pysim-json'));
|
||||
assert.ok(!html.includes('pySim JSON (server)'));
|
||||
});
|
||||
|
||||
test('efRenderFieldsHtml sizes the label column to its content', () => {
|
||||
const out = efRenderFieldsHtml([['ICCID', '8988'], ['Very long label', 'x']]);
|
||||
assert.match(out, /style="display:grid;grid-template-columns:max-content 1fr/);
|
||||
|
||||
Reference in New Issue
Block a user