Skip to content

Port the 3.0.2 proprietary-access fixes to develop - #35

Merged
bjfultn merged 2 commits into
developfrom
fix/port-3.0.2-security
Oct 27, 2026
Merged

bjfultn merged 2 commits into
developfrom
fix/port-3.0.2-security

Conversation

@bjfultn

@bjfultn bjfultn commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

The 3.0.2 hotfix (fcab318) was made on main from v3.0.1 and never merged into develop, so 3.1 builds don't have it. This ports it over.

What comes across from fcab318

  • Query rewriting: the user's whole WHERE predicate is grouped before the proprietary constraint is applied. Query shapes the filter can't rewrite safely (aliases, joins, subqueries, SQL comments) are rejected with HTTP 400, and every referenced table is checked before the protected query path is chosen.
  • Cookie user IDs: bound as parameters for Oracle and PostgreSQL.
  • Logging: passwords, cookies and request values are no longer logged, and only the server environment (TAP_DEBUG=1) can turn on request debugging.
  • Tests: tests/test_propfilter_security.py.

Differences from fcab318

  • Conflicts were resolved toward develop's form handling (DELETE requests) and logging style.
  • Removes one password debug line that compat_vositables.py had gained since 3.0.1.
  • The security tests now give Tap a FieldStorage-like form, because develop reads form.list.
  • Left on main: the 3.0.2 release metadata, HOTFIX-3.0.2.md and the 3.0.1-only conftest.py.

Testing

  • ruff check . passes.
  • pytest tests/: 238 passed, 2 skipped (same skips as develop).

🤖 Generated with Claude Code

The 3.0.2 hotfix (fcab318) was made on main from v3.0.1 and never reached
develop, so 3.1 builds lacked it.  Bring it over:

- group the whole user WHERE predicate before the proprietary constraint is
  applied, and reject query shapes the filter cannot rewrite safely
  (aliases, joins, subqueries, comments), checking every referenced table
- bind cookie user IDs for Oracle and PostgreSQL
- stop logging passwords, cookies and request values; only the server
  environment (TAP_DEBUG=1) can turn on request debugging
- add tests/test_propfilter_security.py

Conflicts kept develop's form handling (DELETE requests) and logging style.
Also drops a password debug line that compat_vositables.py had gained.  The
tests now give Tap a FieldStorage-like form, since develop checks form.list.
Release metadata, HOTFIX-3.0.2.md and the 3.0.1-only conftest stay on main.

ruff passes; 238 passed, 2 skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bjfultn
bjfultn merged commit f8a0387 into develop Oct 27, 2026
6 checks passed
@bjfultn
bjfultn deleted the fix/port-3.0.2-security branch October 27, 2026 15:58
@bjfultn bjfultn mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant