T16.4: security_check skips the D18 refresh check where D18 is absent
Wave 16 rebuilt on main (feat/wave-16-on-main, 2026-10-06) so it can ship without wave 11 and T13.1. main has no sliding refresh, so the one D18 check now runs only when auth.maybe_refresh_token exists; on main it instead proves a valid token near its expiry is still accepted. security_check 36/36 on this branch; smoke 27/27.
This commit is contained in:
@@ -108,9 +108,16 @@ def d21():
|
||||
"login_at": (now - timedelta(minutes=25)).timestamp(),
|
||||
"exp": now + timedelta(minutes=5)}, auth.SECRET_KEY, algorithm="HS256")
|
||||
r = client(token=near).get("/api/projects")
|
||||
check("D21", "the D18 sliding refresh still reissues the session",
|
||||
r.status_code == 200 and auth.COOKIE_NAME in (r.headers.get("set-cookie") or ""),
|
||||
f"status {r.status_code}")
|
||||
if hasattr(auth, "maybe_refresh_token"):
|
||||
check("D21", "the D18 sliding refresh still reissues the session",
|
||||
r.status_code == 200 and auth.COOKIE_NAME in (r.headers.get("set-cookie") or ""),
|
||||
f"status {r.status_code}")
|
||||
else:
|
||||
# D18 (T13.1) is not on this branch (wave 16 built on main, 2026-10-06):
|
||||
# there is no refresh to keep working, so prove the stricter decode still
|
||||
# accepts a valid token about to expire.
|
||||
check("D21", "a valid token close to its expiry is still accepted (no D18 on this branch)",
|
||||
r.status_code == 200, f"status {r.status_code}")
|
||||
import re
|
||||
pin = re.search(r"(?im)^pyjwt==([0-9.]+)", open(os.path.join(ROOT, "server", "requirements.txt")).read())
|
||||
pinned = tuple(int(x) for x in pin.group(1).split(".")) if pin else (0,)
|
||||
|
||||
Reference in New Issue
Block a user