Skip to content
Fossil Update of ”checkin/26b61eb3223648f308cacae742cd46298b573c778630c43a2b1005694df193a5”
Login

Update of ”checkin/26b61eb3223648f308cacae742cd46298b573c778630c43a2b1005694df193a5”

Overview

Artifact ID: 905c5fdbdae5a4a560946cffa1421f99ab71824f043dc6c61ebd04d79f985251
Page Name:checkin/26b61eb3223648f308cacae742cd46298b573c778630c43a2b1005694df193a5
Date: 2026-11-22 15:53:30
Original User: dmestas
Mimetype:text/x-markdown
Content

Overread of the login cookie

login_check_credentials() in src/login.c splits the login cookie at its slashes. When a slash was the last character of the cookie, the parse stepped past the end of its copy, then read beyond it and wrote a zero byte there. A request to any page can carry any cookie, so no login was needed.

The fix stops at a slash that ends the cookie.

Tested with ASan and UBSan on macOS: the cookies ASan stopped on before the fix now give the page as user nobody with no report, and logins by form, cookie, HTTP Basic and token work as before. The tests are in test/login.test, which will come with the test-suite work. Not run on Linux or Windows.