Skip to content

fix(security): export filename sanitiser, dead tcpServer config, HttpOnly WAR cookie (#2348) - #2386

Merged
juanresendiz813 merged 2 commits into
developmentfrom
fix/2348-hygiene
Nov 18, 2026
Merged

juanresendiz813 merged 2 commits into
developmentfrom
fix/2348-hygiene

Conversation

@buggtb

@buggtb buggtb commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The small, safe items from the #2348 hygiene list. Header injection was already blocked by the servlet containers; this removes filename mangling, a misleading dead config and a WAR cookie gap.

Done

  • (b) Export filename. New ContentDispositions (strips everything outside letters/digits/. _ -/space, collapses whitespace, trims leading dots, caps length, emits quoted ASCII filename plus RFC 5987 filename*). Used where the name is request-controlled: ExporterResource chart export, Query2Resource xls/csv/pdf exports, AdminResource download. The other call sites build the name from server config (SaikuProperties), so they are untouched (see below).
  • (c) Dead config. Removed the unread db.tcpServer=-tcpAllowOthers context-param from web.xml (repo grep found no reader).
  • (e, part 1) WAR cookie. web.xml declares <cookie-config><http-only>true</http-only>.

Left as findings (not done here)

Overlap: #2328 and #2329 touch the explain code; this PR does not.

Test plan

  • ContentDispositionsTest (7 cases: sanitising/quoting incl. CR/LF, traversal, non-ASCII, blank default, length cap): mvn -pl saiku-core/saiku-web -am test -Dtest=ContentDispositionsTest
  • Existing Query2Resource*/ExporterResource*/AdminResource* unit tests in saiku-web still pass
  • node acceptance/2348/check.mjs fails on base, passes on head
  • Not run: WAR on stock Tomcat (HttpOnly Set-Cookie) and launcher ITs

Closes #2348

🤖 Generated with Claude Code

buggtb and others added 2 commits November 12, 2026 17:13
…e follow-ups (#2348)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pOnly WAR cookie (#2348)

Adds ContentDispositions (quoted ASCII filename plus RFC 5987 filename*) and uses
it where the name comes from a request parameter (chart, xls/csv/pdf export,
admin download). Removes the unread db.tcpServer=-tcpAllowOthers context-param
and declares the WAR session cookie HttpOnly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@buggtb buggtb added the security Created by Hive for agent-filed issue provenance label Nov 12, 2026
@github-actions github-actions Bot added area/web risk/high Change risk tier: high (see docs/risk-tiers.md) labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown

Semantic model diff

Semantic model diff

No model changes and no broken references.

saiku#1434 · reproduce locally with saiku model diff

@juanresendiz813
juanresendiz813 added this pull request to the merge queue Nov 18, 2026
Merged via the queue into development with commit 549fcef Nov 18, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/web risk/high Change risk tier: high (see docs/risk-tiers.md) security Created by Hive for agent-filed issue provenance

Projects

None yet

2 participants