Repository navigation
Web editor: cap a session at 8 hours and name its cookie __Host-s - #156
Conversation
… and its cookie is __Host-s Assisted-by: Claude Code:claude-opus-5-5
…t come back after millis() wraps (#156 reviews) Assisted-by: Claude Code:claude-opus-5-5
|
Reviews (AppSec and Embedded Firmware Engineer): both FIX, same finding. Session times were on the 32-bit Fixed in 189a96f: Red run of the new test, which uses the reviewer's case (touch at 1 h, request at 1 h + 2^32 ms + 1 min): My first try at this test passed before the fix, because the uint32 parameters truncated the time. I replaced it with the case above. The old "millis() wraps" check in the existing test now crosses 2^32 instead. Green: 71/71, and |
|
AppSec re-review of 189a96f: PASS.
Still pending: the firmware re-review, a panel login check, and a real-browser check of |
|
Embedded Firmware Engineer re-review of 189a96f: PASS.
Both reviews have passed. Auto-merge goes on after the panel login check (agent3 has the panel now). |
|
Panel login check: skipped. The panel now runs Eric's real setup with his own admin password, which I don't use. Main's call: merge on the two reviews alone. Not checked on a device:
|
Hardening left open from #98's web-editor reviews.
Session.startMsandkSessionMaxMsin lib/web; the check is wrap-safe, like the idle check.__Host-prefix: the cookie is now__Host-s. The browser only accepts it from a secure origin withPath=/and noDomain, so another host on the LAN, or a subdomain, can't plant one. The parser no longer reads a plainscookie. After updating, a logged-in browser logs in again once.Red run (
pio test -e native -f test_web, with only the constant added)Green: 70/70 native tests pass, and
crowpanel-devbuilds.Not checked yet
Set-Cookie: __Host-s=…, then a request with it). I'll run it when the panel is free.