Skip to content

Fix --default-deny index page 500 when no config file#2654

Open
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2644-default-deny-index
Open

Fix --default-deny index page 500 when no config file#2654
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2644-default-deny-index

Conversation

@RamiNoodle733
Copy link
Copy Markdown

@RamiNoodle733 RamiNoodle733 commented Mar 7, 2026

Summary

Fixes a regression where --default-deny --root could return a 500 on index/database pages when no config file is present.

What changed

  • Always define the anon_rules CTE in build_allowed_resources_sql() when include_is_private=True
  • Use an empty fallback CTE when there are no anonymous permission SQL rules
  • Added a regression test that authenticates as root and verifies / and /test_db return 200 (not 500) in default_deny=True mode without config

Testing

  • uv run pytest tests/test_default_deny.py -q

Fixes #2644

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.

--default-deny returns 500 on index pages when no config file is present

1 participant