Skip to content
Fossil Update of ”checkin/94412d502b36ebd97a20d7eacbf23f2d018383f3f0354f3f8c701c0f8b49c2fd”
Login

Update of ”checkin/94412d502b36ebd97a20d7eacbf23f2d018383f3f0354f3f8c701c0f8b49c2fd”

Overview

Artifact ID: a1f2bee0b1b8d707797c725a61384a7bff9c4d680b4544930edda3ff3f5be1a1
Page Name:checkin/94412d502b36ebd97a20d7eacbf23f2d018383f3f0354f3f8c701c0f8b49c2fd
Date: 2026-11-22 15:53:30
Original User: dmestas
Mimetype:text/x-markdown
Content

Header lines added through a redirect

cgi_redirect_with_status() in src/cgi.c writes the target of a redirect into the Location header. A target taken from the request, such as the fossil-goto value after a login, that held a carriage return or a line feed ended the header line there, and the rest of it became header lines of its own.

The fix ends the target at its first control character.

Tested with ASan and UBSan on macOS: the request that added a header line before the fix now gets a reply with one Location line and no other change, and redirects without control characters are as before. The tests will come with the test-suite work. Not run on Linux or Windows.