You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
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.
Copy file name to clipboardExpand all lines: README.md
+45-11Lines changed: 45 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,21 @@
8
8
9
9
---
10
10
11
-
## 0.8.5.1 Release Notes
11
+
## 0.8.6 Release Notes
12
12
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.
14
14
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.
18
18
19
19
# Important 0.8.3 Security Upgrade Notice
20
20
21
21
Starting in **0.8.3**, Sortarr introduces a security-focused setup gate to ensure upgrades remain safe and predictable.
22
22
23
23
Existing installations with plaintext secrets will be automatically migrated toward external secret references during startup.
24
24
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.
26
26
27
27
### Why is this necessary?
28
28
@@ -39,7 +39,7 @@ Because of this, the project’s approach has shifted from treating security as
39
39
40
40
2. After upgrading, you will be redirected to the **Setup screen**.
41
41
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**.
43
43
44
44
4. If no session secret key is entered, Setup automatically generates one before saving.
45
45
@@ -57,7 +57,7 @@ or
57
57
58
58
### Migration notes
59
59
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.
61
61
- 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.
62
62
- In this remediation state:
63
63
- 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
88
88
* Support multiple Sonarr and Radarr instances
89
89
* Highlight duplicate titles across instances and filter them quickly
90
90
* 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
91
92
* Fully read-only operation for safety
92
93
93
94
---
@@ -125,7 +126,8 @@ If you want the least confusing setup, use only this supported surface:
-`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`
- 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.
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:
263
286
- 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.
264
287
265
288
Setup includes:
289
+
-**Authentication Method** (`Basic` or `External`) under **Security**
-**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`
268
293
- Proxy trust changes saved through Setup require a restart before Waitress applies them
269
294
-**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
270
295
-**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
271
296
- 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.
272
298
- 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.
273
299
274
300
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.
275
301
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
+
276
307
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.
279
312
-`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`.
280
314
281
315
If diagnostics show `X-Forwarded-Proto`, `X-Forwarded-Host`, and `X-Forwarded-For` as blank:
282
316
1. Confirm Sortarr traffic actually passes through your proxy/router chain.
0 commit comments