[edge] Share fixes: revocation epoch floor kept in edge's own state across restarts, every share=ish1. parameter stripped (also encoded)

This commit is contained in:
2026-11-07 19:22:03 +01:00
parent 7d3af00720
commit 60fb4b63ee
4 changed files with 111 additions and 25 deletions
+16
View File
@@ -496,6 +496,22 @@ mod unix {
assert_eq!(e.get(HOST, "/", Some(&fresh_cookie)).await.status, 302);
assert!(e.edge.stderr().contains("epoch"), "the refusal is logged");
// Edge remembers the highest epoch in its own state: after a restart a lower one
// (control's files rolled back) is still refused.
e.edge.write_revocations(1, &[]);
e.edge
.admin("POST", "/v1/share-revocations/reload", None)
.await;
let mut e = e;
e.edge.restart();
e.edge.write_revocations(0, &[]);
let r = e
.edge
.admin("POST", "/v1/share-revocations/reload", None)
.await;
assert_eq!(r.status, 422, "{}", r.text);
assert_eq!(e.get(HOST, "/", Some(&keep_cookie)).await.status, 302);
// A broken file keeps the last good state; a missing one stops all share access.
e.edge.write_revocations(1, &[]);
e.edge