Commit Graph
347 Commits
Author SHA1 Message Date
renovate[bot] 5bcea5a7df Update all dependencies 2026-09-14 06:59:12 +02:00
renovate[bot] d3f691e695 Update all dependencies (#3617)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-07 04:49:02 +00:00
Safihre d25d857fc4 Remove ISSUES.txt and refer to wiki for known issues 2026-09-04 11:47:44 +02:00
Safihre ab3ba4a53a Add Discord integration for release notes
Posts release notes automatically to designated Discord webhooks, supporting separate channels for pre-release and stable builds.
2026-09-04 11:37:54 +02:00
renovate[bot] f9cb5b302b Update all dependencies 2026-08-31 08:56:46 +02:00
mnightingale b192a7eca4 Persistent sessions, CSRF tokens, and no apikey in the web interface (#3559)
* Add a session store that keeps web-UI logins in the admin folder

* Authenticate the web interface with session cookies and CSRF tokens

* Stop embedding the apikey in the web interface

* Cover the session, CSRF and apikey changes
2026-08-27 13:05:12 +02:00
Safihre 90f092a1a5 Automate LinuxServer.io Docker image builds
Trigger the corresponding LinuxServer.io Docker image build (develop for
pre-releases, master for stable) after a SABnzbd release, ensuring the
Docker images are kept up-to-date.
2026-08-27 11:54:55 +02:00
renovate[bot] 743ff89cff Update all dependencies (#3591)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-24 07:37:39 +02:00
renovate[bot]andSafihre e0bf9218bb Update all dependencies (#3575)
* Update all dependencies

* Add feedparser-sgmllib

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-08-18 10:01:04 +02:00
mnightingale 35d5355f49 Replace CherryPy with Uvicorn and Starlette (#3550)
* Migrate web interface from CherryPy to Uvicorn/Starlette

Squashed rebase of feature/uvicorn (34 commits) onto develop, reconciled
with ~3 months of intervening develop changes.

Replaces the CherryPy webserver and request handling with Uvicorn/Starlette
across the API, web interface, RSS, config pages and related modules.

Reconciliation with develop during the rebase:
- api.py: kept develop's security/behaviour fixes (orphan path-traversal
  guard, expanded log redaction incl. host_whitelist and
  remote_label_replacement, get_dconfig single-return, get_retryable_jobs,
  connections default, translated NNTP test errors) on top of the Starlette
  request/response rewrite.
- interface.py: ported the RSS route handlers to develop's DB-backed
  RSSRepository API (process_feed, rss_repository / find_job_by_url /
  clear_feed / clear_downloaded / flag_downloaded).
- misc.py: kept develop's hachoir-based get_media_duration.
- requirements.txt: dropped the CherryPy stack, adopted develop's newer pins.

Also applied ruff --fix (PEP 604 unions, builtin generics) to align with
develop's lint config.

Verified: ruff check, black --check, and the affected test suites
(9413 passed, 1 skipped) all pass.

* Update starlette/uvicorn versions

* Fix race issues in global rss state

* Fix test race in server shutdown

The uvicorn migration turned /shutdown (and the shutdown API) into fire-and-forget: it spawned shutdown_program() in a background thread and replied immediately, whereas develop ran it synchronously and only replied once halt() had persisted all state. Because the module-scoped test teardown doesn't wait for the process to exit, the next module's clean_cache_dir wiped the shared cache dir (and reused the fixed port) while the previous instance was still saving state and holding the port — producing the three intermittent failures (deleted sabnzbd.log → "File log disabled or not found"; un-persisted [sorters] → KeyError; stale instance → missing wizard .quoteBlock).

* Fix robots and description, add favicon

* Remove remains of http basic auth

* Setup Starlette once configuration is available, fix static file relative cwd and url_base config

* abort_and_show_error when webserver fails to start

* Guard stopping webserver that never started

* Delegate XFF handling to ProxyHeadersMiddleware

* Merged params at request.state.params instead of modifying private apis

* Both shutdown routes share implementation and do not block event loop

* Run sync handlers via run_in_threadpool and facilitate eventual migration to async

* Pool database connections

* Online backup of database due to WAL changes

* Fix exception on None request.client (test clients or unix sockets)

* Fix flakey tests due to process not fully shutting down

* Restore X-Frame-Options behaviour via middleware

* Fix set_config_default with multiple keywords

* Remove broken logging call

* Restore api logging functionality

* Cache-Control: no-store

* Login only via POST

* Remove 401 (basic-auth) and add 404 handling via redirect

* Fix crash when shutdown not an int

* Use BaseRedirectResponse helper

* Remove trailing slashes from wizard routes

* URL helper, absolute URLs everywhere, fixes issues with nested navigation

* Fix scheduler adding multiple daysofweek

* Restore CherryPy api behaviour merging body with query params (body wins)

* Clearer documentation of get_request_params and request_params

* First stage supporting gradual api async

* Fix rss ajax consuming flash

* Restore access log functionality

* Hostname check in middleware

* Request logging in middleware

* Param parsing in middleware

* Security checks in middleware

* secured_expose is now purely route registration

* Lookup api handler once per request

* Fix flakey alert dialogs

* Trigger restart via BackgroundTask

* Restore CherryPy first param wins and get/post consistency

* Remove dead code

* Secure cookies based on protocol the client used

* Fix various issues with port_is_free

1. port_is_free answered the wrong question. It connect-probed ("is something answering?") rather than bind-probed ("can I bind?"). A port could report free and then kill startup at uvicorn's bind().
2. The bind-all remap crossed address families. :: was mapped to 127.0.0.1, probing IPv4 for an IPv6 bind — a regression against portend, which maps :: → ::1.
3. The call sites passed the wrong host. browserhost is a client-reachable address; the thing that has to be bindable is web_host.
4. Errors were swallowed. A bare except OSError hid gaierror, so an unresolvable host reported "free".
5. find_free_port had a port-0 trap. Under a bind-probe, currentport=0 always succeeds and returned 0 — the old failure sentinel. Now guarded, and None instead of 0.
6. Ports 80/443 were misdiagnosed. EACCES was folded into "occupied", producing ten futile probes and a panic claiming another program held the port. PermissionError now propagates to a dedicated panic explaining the actual remedies.
7. The tests were largely tautological. Three tests covering one branch, an IPv6 test with no IPv6 in it, a timeout test that never engaged the timeout, TOCTOU-prone fixed-range probes, no SO_REUSEADDR on the helper listener, and nothing asserting the property that matters — that "free" implies bindable.
8. A portability bug I introduced, then fixed. I'd baked Linux SO_REUSEADDR overlap semantics into four assertions; macOS differs. Now platform-aware, with the IPv6 regression re-covered by checking the socket family directly.

* Claim the bind address for uvicorn on startup, resolves "49" in err handling from cherrypy

* Rename function BaseRedirectResponse to base_redirect_response

* Restore error response on change web directory

* Add missing typings

* Fix return type of retry job for future types

* A better fix for xdist compatibility - test overwrote db_path

* Secure session cookies (rss flash)

* Inline or remove some functions

* Retry job futuretype behaviour

* Sneak a worksteal fix in

* Test and fix retry_job futuretype behaviour
2026-08-11 13:27:51 +01:00
renovate[bot] b5a7385d48 Update all dependencies (#3557)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-10 06:10:25 +00:00
renovate[bot] 1b6aea3afb Update all dependencies (#3526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-27 08:43:03 +03:00
renovate[bot] 2d2b88e771 Update all dependencies (#3509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-20 08:34:32 +02:00
renovate[bot] 28eaa6c20d Update all dependencies (#3495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-13 07:00:26 +02:00
Safihre bf02e9da44 Add defusedxml to release requirements 2026-07-10 15:46:07 +02:00
renovate[bot] 8afb8a91e2 Update all dependencies (#3487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-06 14:16:16 +02:00
SABnzbd Automation 2e202eca23 Update translatable texts
[skip ci]
2026-07-03 07:23:36 +00:00
renovate[bot] 6db37d9883 Update all dependencies (#3474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-29 10:18:02 +02:00
SABnzbd Automation 972f4832c1 Update translatable texts
[skip ci]
2026-06-22 12:11:48 +00:00
SABnzbd Automation 7b90868007 Update translatable texts
[skip ci]
2026-06-22 08:26:21 +00:00
renovate[bot] 9b33f4ce85 Update all dependencies (#3464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-22 09:08:33 +02:00
Safihre 89e8788b03 Improve installer compression with solid LZMA
Configure NSIS to use solid LZMA compression, which deduplicates identical files and shrinks the overall installer size.
2026-06-16 14:47:42 +02:00
Safihre 5d3286654e Enforce explicit dependency pinning for improved build security
All direct and transitive dependencies are now explicitly listed in
`requirements.txt` files, and `pip install` commands consistently use
`--no-dependencies`.

This approach ensures that only the specified versions are installed,
enhancing supply chain security and build reproducibility by preventing
automatic dependency resolution. The `--upgrade` flag was removed from
these installations as it is no longer necessary with fully pinned
dependencies.
2026-06-16 11:54:11 +02:00
Safihre 8919aa7ec0 Remove INSTALL.txt and update documentation references
The `INSTALL.txt` file has been removed, as all installation instructions are now exclusively maintained on the project wiki. This updates `README.md` and build artifacts to reflect this change.

Additionally, `COPYRIGHT.txt` has been updated to include a new active team member, streamline translation contributor credits, and provide a direct link to GNU licenses. A minor CSS adjustment for the mobile UI is also included.
2026-06-15 14:05:47 +02:00
Safihre 6f342dade5 Streamline release artifact handling and enforce Windows signing
This update improves the release workflow by:
*   Configuring GitHub Actions `upload-artifact` to transfer files directly without unnecessary zipping, simplifying artifact retrieval for subsequent jobs.
*   Integrating `pefile` to perform an Authenticode signature check on the Windows installer, ensuring all official releases are properly signed.
2026-06-15 10:26:24 +02:00
Safihre 129aae79a1 Pin cryptography version for macOS universal2 builds
Versions 49.0.0 and higher are arm64-only, which prevents universal2
wheel distribution. This ensures continued compatibility for macOS.
See https://github.com/pyca/cryptography/issues/13520
2026-06-14 12:01:25 +02:00
Safihre aee1cd8e41 Improve NSIS installer and uninstaller robustness
Enhance installer and uninstaller logic to ensure more reliable operation:

- Properly stop, delete, and manage the Windows service during uninstall.
- Implement more robust process termination for SABnzbd.exe.
- Add checks to prevent accidental deletion of unrelated directories.
- Dynamically calculate and display the installed size in Add/Remove Programs.
- Correctly target user-specific settings during uninstallation.
2026-06-12 12:04:53 +02:00
renovate[bot] 1f3cd7adbd Update all dependencies (#3453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-08 06:48:04 +02:00
renovate[bot] dc870495c5 Update all dependencies (#3448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-04 11:05:39 +02:00
renovate[bot] 1ce1440df8 Update all dependencies (#3436)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-26 15:53:21 +02:00
Safihre 0434dca45f Enable additional Ruff checks and implement fixes 2026-05-13 21:50:32 +02:00
Safihre 81bc2a384f Add F401 unused imports check
This change enables `F401` (unused import) checks in Ruff and configures per-file ignores for intentional top-level imports. The newly enforced check led to the removal of several unused imports across the codebase.

Additionally, the module existence check for `certifi` was modernized to use `importlib.util.find_spec` for a more efficient and robust approach.
2026-05-13 20:37:55 +02:00
SABnzbd Automation 8d83240b1a Update translatable texts
[skip ci]
2026-04-28 21:24:40 +00:00
renovate[bot] 5ef63fd414 Update all dependencies (#3384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-27 01:01:31 +00:00
renovate[bot] d45295e4ee Update all dependencies (#3378)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 07:52:34 +02:00
Safihre 375cc4955d Put releasing a new version behind manual approval 2026-04-14 09:42:13 +02:00
renovate[bot]andSafihre a0feeb66c1 Update all dependencies (#3371)
* Update all dependencies

* Restore compatibility

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-04-07 07:10:25 +00:00
SABnzbd Automation dbd71a3786 Update translatable texts
[skip ci]
2026-04-06 20:38:51 +00:00
SABnzbd Automation 41755e1219 Update translatable texts
[skip ci]
2026-04-06 20:28:03 +00:00
Safihre 6dda8125f7 Merge make_dmg into main package.py (#3372)
* Fix icon variable assignment and adjust icon location

* Add pyobjc-framework-Quartz to requirements

* Change DMG icon path to logo-arrow.svg

Updated the icon path for the DMG build process.

* Integrate make_dmg into package.py

* Remove 'format' key from package configuration

Removed 'format' key from configuration dictionary.
2026-04-06 09:04:05 +02:00
Safihre 706dddcac9 Add HTML Readme also for the macOS installer 2026-04-03 11:00:20 +02:00
Safihre b002df09f9 Convert Readme to HTML for Windows installer 2026-04-03 11:00:15 +02:00
Safihre 128d969429 Remove notice about SABHelper from <3.0 version 2026-04-03 08:54:10 +02:00
Safihre 7b6f6801c7 Notify users that ARM64 version is available 2026-04-03 08:52:22 +02:00
Safihre 978be46be4 Refactor .mo file generation
Updated msgfmt to latest version
2026-03-31 13:41:49 +02:00
Safihre f2ad9e6582 Tweaks to make_dmg 2026-03-30 14:24:06 +02:00
Safihre dc542e4bef Tweaks to SABnzbd.spec 2026-03-30 14:17:25 +02:00
Joe Kappus f2d4347e1b builder/package.py: stop mangling test data (#3364)
Broke tests on Debian/Ubuntu, they reported it, never figured it out.

(#2274)

On Gentoo we skipped the failing test for years but 'just plain fails'
didn't sit right with me. We found the tests only fail using release
tarball, not git.

package.py script 'fixes' the line endings on .txt extensions but doesn't
account for a stillrarbutnotagoodname.txt rar binary in the test data.

This breaks tests on anyone using the release tarballs. So we skip mangling
the test data to allow for downstream CI to work.
2026-03-25 07:49:03 +01:00
renovate[bot] 5bfa4c8bac Update all dependencies (#3359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 00:37:22 +00:00
renovate[bot]andSafihre 934d81de91 Update all dependencies (#3353)
* Update all dependencies

* Unlock ujson dep for older Python

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Safihre <safihre@sabnzbd.org>
2026-03-16 09:24:21 +01:00