[edge] Share fixes: per-network password limit and no eviction, revocation epoch never goes down, stray share tokens stripped on every host, admin socket bound in a private directory
This commit is contained in:
@@ -309,6 +309,25 @@ mod unix {
|
||||
let t2 = link("closed.test", 7, "/", now() + 3600, None);
|
||||
let r = e.get("closed.test", &format!("/?share={t2}"), None).await;
|
||||
assert_eq!(r.status, 302);
|
||||
// ...and is not passed on to the auth server or the upstream either.
|
||||
let r = e
|
||||
.get(
|
||||
"closed.test",
|
||||
&format!("/x?b=2&share={t2}"),
|
||||
Some("authelia_session=good"),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(r.status, 200);
|
||||
let body: serde_json::Value = serde_json::from_slice(&r.body).unwrap();
|
||||
assert_eq!(body["query"], "b=2");
|
||||
for req in e.auth.requests() {
|
||||
for (_, v) in &req.headers {
|
||||
assert!(
|
||||
!String::from_utf8_lossy(v).contains("ish1."),
|
||||
"token sent to the auth server"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@@ -460,7 +479,11 @@ mod unix {
|
||||
.await;
|
||||
assert_eq!(r.status, 422, "{}", r.text);
|
||||
assert!(r.text.contains("epoch"), "{}", r.text);
|
||||
assert_eq!(e.get(HOST, "/", Some(&keep_cookie)).await.status, 302, "still stopped");
|
||||
assert_eq!(
|
||||
e.get(HOST, "/", Some(&keep_cookie)).await.status,
|
||||
302,
|
||||
"still stopped"
|
||||
);
|
||||
assert_eq!(e.get(HOST, "/", Some(&fresh_cookie)).await.status, 200);
|
||||
|
||||
// Without the admin call, edge notices a changed file within 5 s.
|
||||
|
||||
Reference in New Issue
Block a user