fix: enforce settings authority boundaries (#618)

Close generic settings authorization bypasses and enforce per-setting authority, validation, redaction, transactional config import, and route-local write rate limiting.
This commit is contained in:
SnapOtter
2026-07-22 20:15:38 +08:00
committed by GitHub
parent 0467e87bfe
commit 44d8109486
63 changed files with 2287 additions and 731 deletions
+2 -2
View File
@@ -176,7 +176,7 @@ base.describe("RBAC - User sees restricted tabs", () => {
const settingsRes = await fetch(`${API}/api/v1/settings`, {
method: "PUT",
headers: authJson(bearerToken),
body: JSON.stringify({ testSetting: "hacked" }),
body: JSON.stringify({ defaultTheme: "dark" }),
});
expect(settingsRes.status).toBe(403);
});
@@ -278,7 +278,7 @@ base.describe("RBAC - Editor sees collaborative tabs", () => {
const settingsRes = await fetch(`${API}/api/v1/settings`, {
method: "PUT",
headers: authJson(token as string),
body: JSON.stringify({ testSetting: "hacked" }),
body: JSON.stringify({ defaultTheme: "dark" }),
});
expect(settingsRes.status).toBe(403);
});