diff --git a/.coverage b/.coverage deleted file mode 100644 index abcf0a6..0000000 Binary files a/.coverage and /dev/null differ diff --git a/.gitignore b/.gitignore index b1276f5..e6c6eb2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,18 @@ __pycache__/ .ruff_cache/ dist/ +# setuptools / uv build output +/build/ +/src/*.egg-info/ + # Test / coverage /coverage/ /tmp/ +/.coverage +/.coverage.* + +# Transient log files (pytest, dev servers, scratch) +/*.log # mkdocs / Sphinx build output /site/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1897914..eed1485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [development] +### Fixed + +- **`web/templates/*.jinja` missing from distribution wheel** — added `web/templates/*.jinja` to `[tool.setuptools.package-data]` in `pyproject.toml`. After a fresh install from PyPI the admin panel returned 500 because `Jinja2Templates` could not find any templates. +- **Duplicate `script-src` / `style-src` in admin CSP** — the nonce-augmented directives used to be *appended* after the base ones, so the browser (which honours the first occurrence) ignored the nonce and blocked every inline JS/CSS. They are now *replaced*: `script-src` and `style-src` are filtered out of the base CSP and the nonce versions are appended as the only occurrence. +- **CSP nonce generated after template rendering** — `request.state.csp_nonce` is now set in `GlobalSecurityHeadersMiddleware.dispatch()` *before* `call_next(request)` so templates see it during rendering. Previously it was generated afterwards, so `csp_nonce` was an empty string in the template context and every inline script was blocked. +- **Missing `nonce` attribute on `