You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error log lines quote DuckDB error text verbatim, so a URL can fake log fields #259
Found during the #252 review (it also happens with the HTTP request log switched off).
[error] Error handling request: … HTTP HEAD error on '<url>' quotes DuckDB's error text, URL included, inside the flAPI log line. A request parameter that ends up in a URL can carry a space-separated request_id=FAKE (or trace_id=…). In text format, a log parser that splits on spaces then reads it as a field. Since #252, CR/LF are escaped in every message, so whole lines can no longer be forged; this residual is only about fields.
Fix idea: when a log message embeds error text that comes from DuckDB or from the request, quote it (e.g. error="…" with " and \ escaped), or percent-encode spaces in embedded URLs as FormatDuckDBHttpLogLine does. Add an integration test with a string parameter containing request_id=FAKE that reaches a failing read_csv('http://…/{{{params.x}}}').
Related, found in the cross-PR review of #261: under restricted the template allowlist still permits SELECT write_log('...', log_type := 'HTTP'), so a template can write entries the #252 sink renders as duckdb http ... lines. The request_id is still taken from the request context, so attribution holds, but method/URL/status in such a line are the template's choice. Fix together with the error-text forging: refuse write_log in templates, or have the sink drop entries that do not come from DuckDB's HTTP client.
Activity
jrosskopf commentedon Nov 24, 2026
Related, found in the cross-PR review of #261: under
restrictedthe template allowlist still permitsSELECT write_log('...', log_type := 'HTTP'), so a template can write entries the #252 sink renders asduckdb http ...lines. The request_id is still taken from the request context, so attribution holds, but method/URL/status in such a line are the template's choice. Fix together with the error-text forging: refusewrite_login templates, or have the sink drop entries that do not come from DuckDB's HTTP client.🤖 Generated with Claude Code
https://claude.ai/code/session_018txuxF9jXyiKakpUoXrKBi