Audit the project and secure toolbox data

This commit is contained in:
Shinuwa 2026-10-14 16:59:09 +02:00
parent 96af62edf0
commit e87edda5c7
40 changed files with 2324 additions and 125 deletions

View file

@ -1015,12 +1015,16 @@ test("toolbox modules preserve only active shell display options", () => {
});
test("legacy toolbox order becomes a persistent default space", () => {
const toolbox = normalizeToolbox({
const legacy = {
id: "legacy",
modules: [{ id: "a", type: "notepad" }, { id: "b", type: "links" }],
moduleOrder: { one: ["b", "a"], two: [["a"], ["b"]] }
});
};
const toolbox = normalizeToolbox(legacy);
assert.equal(toolbox.spaces.length, 1);
assert.equal(toolbox.spaces[0].id, "default");
assert.equal(normalizeToolbox(legacy).spaces[0].id, toolbox.spaces[0].id);
assert.equal(normalizeToolbox(legacy).updatedAt, toolbox.updatedAt);
assert.equal(toolbox.spaces[0].name, "Défaut");
assert.equal(toolbox.defaultSpaceId, toolbox.spaces[0].id);
assert.equal(toolbox.activeSpaceId, toolbox.spaces[0].id);