Skip to content

Commit 10e170b

Browse files
committed
Release 0.8.6
1 parent 8af3e64 commit 10e170b

9 files changed

Lines changed: 1131 additions & 15350 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [0.8.6] - 2026-03-18
4+
5+
### Fixes
6+
- Added a simple Sonarr-style authentication choice in Setup and config: `Basic` or `External`. Direct installs and transparent reverse proxies keep the existing `Basic` default, while `External` is now an explicit opt-in for trusted reverse proxies that already handle login.
7+
- Centralized route and `/setup` auth evaluation so both flows use the same auth boundary, and added local regression coverage for trusted-upstream auth, spoof rejection, and external-mode setup access.
8+
- Added `SORTARR_AUTH_METHOD` and `SORTARR_UPSTREAM_AUTH_HEADER`, plus diagnostics/self-check reporting for the active auth source. `External` mode now requires an explicit `SORTARR_WAITRESS_TRUSTED_PROXY` and no longer falls back to a browser Basic Auth challenge.
9+
- Fixed setup/session cookie transport policy so plain HTTP setup/save flows no longer force `Secure` cookies just because proxy mode is configured or still unset during bootstrap. Session and CSRF cookies now follow the effective request scheme by default, with `SORTARR_SESSION_COOKIE_SECURE=1|0` still available as an explicit override.
10+
- Fixed proxied HTTPS setup/save CSRF origin mismatches on Waitress by stopping Waitress from stripping trusted `X-Forwarded-*` headers before Sortarr's own proxy middleware can translate them. Sortarr now preserves the raw proxy peer first, then applies trusted forwarded host/proto/port handling for proxied requests.
11+
- Setup now preserves submitted non-secret values after failed validation or connection testing so operators do not have to re-enter proxy settings, URLs, path maps, and other advanced fields on every failed save attempt.
12+
- Setup, CSRF diagnostics, and the security self-check now warn explicitly when plain HTTP would still receive `Secure` session/CSRF cookies, including the forced-override case that would cause the next POST to drop those cookies.
13+
- Cookie security now also honors an explicit `https://...` public URL/origin hint from `SORTARR_PUBLIC_HOST` / `SORTARR_PUBLIC_URL` / `SORTARR_PUBLIC_ORIGIN`, preventing accidental cookie downgrades when an HTTPS deployment still has incomplete proxy trust.
14+
- Upgrade note: if `SORTARR_PUBLIC_HOST`, `SORTARR_PUBLIC_URL`, or `SORTARR_PUBLIC_ORIGIN` is set to `https://...`, Sortarr now treats that as an HTTPS hint for cookie security. If your actual deployment is still plain HTTP, remove that `https://...` value or set `SORTARR_SESSION_COOKIE_SECURE=0` so browsers will return the setup/session cookies on the next POST.
15+
316
## [0.8.5.1] - 2026-03-12
417

518
### Fixes

README.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88

99
---
1010

11-
## 0.8.5.1 Release Notes
11+
## 0.8.6 Release Notes
1212

13-
`0.8.5.1` is a hotfix for the `0.8.5` Docker publish failure.
13+
`0.8.6` hardens setup, auth, and reverse-proxy handling for the current GitHub CSRF/auth issue set.
1414

15-
- Removes `run_waitress.py` from `.gitignore` and adds the file to the repository so release builds actually include the shared Waitress entrypoint.
16-
- Fixes the `Dockerfile` copy step for published images, allowing the container release pipeline to build the same Waitress proxy-trust startup path used locally.
17-
- Keeps the `0.8.5` packaging/logging changes intact while correcting the missing tracked-file regression.
15+
- Fixes setup/save CSRF failures across direct HTTP, LAN proxy, and trusted HTTPS proxy deployments by making cookie security request-aware and preserving trusted forwarded headers through Waitress.
16+
- Adds a simple Sonarr-style auth choice: `Basic` or `External`. Direct installs keep `Basic`, while reverse proxies that already handle login can now opt into trusted upstream auth cleanly.
17+
- Preserves submitted setup values after failed saves and adds clearer diagnostics when cookie transport or proxy trust would break the next POST.
1818

1919
# Important 0.8.3 Security Upgrade Notice
2020

2121
Starting in **0.8.3**, Sortarr introduces a security-focused setup gate to ensure upgrades remain safe and predictable.
2222

2323
Existing installations with plaintext secrets will be automatically migrated toward external secret references during startup.
2424

25-
If you are upgrading an installation from a version prior to **0.8.3**, you will be required to complete a one-time migration step. During this process, you will need to re-enter your API keys and configure a **Basic Auth username and password**. This action only occurs once and will not be required again in future upgrades.
25+
If you are upgrading an installation from a version prior to **0.8.3**, you will be required to complete a one-time migration step. During this process, you will need to re-enter your API keys, choose an **Authentication Method** (`Basic` or `External`), and configure the required auth settings for that method. This action only occurs once and will not be required again in future upgrades.
2626

2727
### Why is this necessary?
2828

@@ -39,7 +39,7 @@ Because of this, the project’s approach has shifted from treating security as
3939

4040
2. After upgrading, you will be redirected to the **Setup screen**.
4141

42-
3. Enter your previously configured service details (URLs, API keys, Basic Auth username and password), and generate a **secret key**.
42+
3. Enter your previously configured service details (URLs, API keys), choose who handles login (`Basic` or `External`), and generate a **secret key**.
4343

4444
4. If no session secret key is entered, Setup automatically generates one before saving.
4545

@@ -57,7 +57,7 @@ or
5757

5858
### Migration notes
5959

60-
- If any post-bootstrap security requirement is still pending (`missing_basic_auth`, `missing_persistent_secret`, or `upgrade_resave_required`), only **Setup**, static assets, and language switching remain available until Setup is saved again.
60+
- If any post-bootstrap security requirement is still pending (`missing_basic_auth`, `missing_upstream_auth_header`, `invalid_upstream_auth_header`, `external_auth_requires_proxy_mode`, `explicit_trusted_proxy_required`, `missing_persistent_secret`, or `upgrade_resave_required`), only **Setup**, static assets, and language switching remain available until Setup is saved again.
6161
- If Basic Auth is partially configured (username without password or password without username), Sortarr allows Setup access so credentials can be repaired instead of returning a hard server error.
6262
- In this remediation state:
6363
- HTML routes redirect to `/setup?force=1`
@@ -88,6 +88,7 @@ Sortarr does not modify, move, or rename your media. It can analyse Sonarr and R
8888
* Support multiple Sonarr and Radarr instances
8989
* Highlight duplicate titles across instances and filter them quickly
9090
* Support global quick text filtering across row data (for example `aac`)
91+
* Show exact FPS and BPPF for Radarr movie rows, plus exact FPS/BPPF in Sonarr episode expansions when Arr reports frame-rate metadata
9192
* Fully read-only operation for safety
9293

9394
---
@@ -125,7 +126,8 @@ If you want the least confusing setup, use only this supported surface:
125126
- Plex path: `PLEX_URL` + `PLEX_TOKEN*`
126127
- `SORTARR_PROXY_MODE` (`direct|single|double|custom`)
127128
- `SORTARR_WAITRESS_TRUSTED_PROXY` (recommended for proxied Waitress deployments; otherwise Sortarr falls back to wildcard trust with a startup warning)
128-
- Required auth: `BASIC_AUTH_USER` + (`BASIC_AUTH_PASS_FILE` or `BASIC_AUTH_PASS_CRED_TARGET`)
129+
- Authentication boundary `Basic`: `SORTARR_AUTH_METHOD=basic` plus `BASIC_AUTH_USER` + (`BASIC_AUTH_PASS_FILE` or `BASIC_AUTH_PASS_CRED_TARGET`)
130+
- Authentication boundary `External`: `SORTARR_AUTH_METHOD=external` plus `SORTARR_UPSTREAM_AUTH_HEADER` and an explicit `SORTARR_WAITRESS_TRUSTED_PROXY`
129131
- Optional CSRF escape hatch: `SORTARR_CSRF_TRUSTED_ORIGINS` (exact origins only)
130132

131133
Copy and adapt: `Sortarr.minimal.env.example`
@@ -249,6 +251,27 @@ Open the Wiki:
249251

250252
## Reverse Proxy and Security Notes
251253

254+
### Authentication Method
255+
256+
Sortarr now follows one simple rule:
257+
258+
- `Basic`
259+
Sortarr handles login itself
260+
- `External`
261+
your trusted reverse proxy handles login
262+
263+
Use `Basic` for:
264+
265+
- direct installs
266+
- reverse proxies that only forward traffic / TLS
267+
268+
Use `External` for:
269+
270+
- reverse proxies that already do login for the Sortarr route
271+
- external auth systems such as proxy-managed Basic Auth or forward-auth
272+
273+
Do not try to run two independent login layers on the same route with different credentials. If your reverse proxy already handles login, switch Sortarr to `External` instead of stacking a second Sortarr Basic Auth prompt behind it.
274+
252275
### Reverse proxy / HTTPS (Traefik, Nginx, Cloudflare, etc.)
253276

254277
When Sortarr runs behind a reverse proxy, it must trust `X-Forwarded-*` headers so Flask can resolve the correct external scheme/host (for example `https://sortarr.mydomain.com`).
@@ -263,20 +286,31 @@ Supported proxy contract on Waitress:
263286
- If `X-Forwarded-Proto` or `X-Forwarded-Port` arrive with commas, Sortarr diagnostics now warn explicitly because Waitress 3.x rejects those shapes when the headers are trusted.
264287

265288
Setup includes:
289+
- **Authentication Method** (`Basic` or `External`) under **Security**
266290
- **Proxy mode** preset (`Direct`, `Single proxy`, `Two proxies`, `Custom`) under **Advanced settings -> Network & CSRF**
267291
- **Waitress trusted proxy** field under **Advanced settings -> Network & CSRF** for the immediate upstream proxy IP/host
292+
- **Upstream auth header** under **Security** when `Authentication Method = External`
268293
- Proxy trust changes saved through Setup require a restart before Waitress applies them
269294
- **Run proxy/CSRF diagnostics**, which reports current forwarded headers, current vs suggested proxy mode, and latest CSRF mismatch reason from `GET /api/diagnostics/csrf` after the required security setup save completes
270295
- **Run security self-check diagnostics** from `GET /api/diagnostics/security-self-check` after security setup is complete to get pass/fail signals for persistent secret status, unsafe recovery mode, trusted-origin policy validity, and cookie/CSP guardrails
271296
- Direct HTTP installs in `Proxy mode = direct` are treated as healthy when cookies are intentionally non-`Secure` on plain HTTP.
297+
- Setup, CSRF diagnostics, and the security self-check now warn explicitly if plain HTTP is detected but Sortarr would still issue `Secure` cookies, because the browser would drop them on the next POST.
272298
- The default CSP now keeps `connect-src` same-origin only, so browser API calls remain limited to Sortarr itself unless you intentionally broaden policy in code later.
273299

274300
While Setup is security-locked, the remediation path is intentionally narrow: finish the required Setup save first, then run diagnostics if you still need them.
275301

302+
Authentication boundary notes:
303+
- `Basic` remains the secure default for direct installs and transparent reverse proxies.
304+
- `External` is opt-in and only supported when `SORTARR_WAITRESS_TRUSTED_PROXY` is set to the immediate proxy IP/host.
305+
- In `External`, Sortarr trusts only the configured upstream identity header from that trusted proxy and does not emit a browser Basic Auth challenge of its own.
306+
276307
Cookie policy:
277-
- `Proxy mode = direct` keeps session/CSRF cookies usable on plain HTTP LAN installs by default.
278-
- Proxied modes keep `Secure` cookies by default.
308+
- Session/CSRF cookies follow the effective browser-facing request scheme by default.
309+
- Plain HTTP requests, including first-time Setup on LAN HTTP installs, keep cookies non-`Secure` so the next setup/save POST can return the CSRF/session cookies successfully.
310+
- HTTPS requests, and proxied requests that still present `X-Forwarded-Proto: https`, keep `Secure` cookies by default.
311+
- If proxy trust is still incomplete, an explicit `https://...` value in `SORTARR_PUBLIC_HOST`, `SORTARR_PUBLIC_URL`, or `SORTARR_PUBLIC_ORIGIN` is treated as an HTTPS hint for cookie security only so Sortarr does not accidentally downgrade cookies on an HTTPS deployment.
279312
- `SORTARR_SESSION_COOKIE_SECURE=1|0` can still override that behavior explicitly if needed.
313+
- If Setup or diagnostics warn that plain HTTP would still receive `Secure` cookies, switch `Proxy mode` to `Direct` for that deployment or set `SORTARR_SESSION_COOKIE_SECURE=0`.
280314

281315
If diagnostics show `X-Forwarded-Proto`, `X-Forwarded-Host`, and `X-Forwarded-For` as blank:
282316
1. Confirm Sortarr traffic actually passes through your proxy/router chain.

0 commit comments

Comments
 (0)