Commit Graph
8 Commits
Author SHA1 Message Date
owen 684952a710 Fix dangling reference in scanner event proxy and missing transaction in share artwork
- main.cpp: proxyScannerEventsToApplication() captured its local `postAll`
  lambda by reference ([&]) inside connections registered on the scanner
  service's long-lived signals. Those connections outlive the function call,
  so every scan event since startup was invoking a dangling reference to an
  already-popped stack frame - undefined behavior, deep in Wt's own signal
  dispatch, from the very first scan onward. This lines up with what we're
  seeing in production: sporadic SIGSEGV crashes (exit code 139) inside
  Wt::Signals::Impl::SignalLinkBase::isConnected(), confirmed via host dmesg,
  roughly every 1-2 hours of uptime. Fixed by capturing `postAll` by value
  (it's a stateless lambda, so this is free); `server` remains a valid
  reference since it lives for the whole program.

- PublicShareResource.cpp: the /artwork branch called
  IArtworkService::getImage(), which lazily resolves artwork through the DB,
  outside of any transaction (the read transaction that populated `items`
  had already closed). Confirmed in production logs: "Uncaught exception
  from handleRequest (aborting request): Operation requires an active
  transaction". Wrapped it in a read transaction, matching the pattern used
  elsewhere in this file.
2026-08-20 10:56:50 -05:00
owen 6d0f8fcc5a Fix fresh-install schema gap and OIDC provider CA trust
- Session::prepareTablesIfNeeded(): Wt::Dbo's automatic createTables()
  silently fails to create 4 tables (share, starred_artist,
  starred_release, starred_track) on a genuinely fresh database, with
  no exception raised and no clear reason found in Wt::Dbo internals.
  These tables are otherwise only ever created via historical schema
  migrations, which never run for a fresh install (new DBs are stamped
  directly at LMS_DATABASE_VERSION). Reproduced consistently across
  multiple from-scratch database attempts. Added defensive
  CREATE TABLE IF NOT EXISTS statements for all 4 right after
  createTables() as a targeted workaround; harmless no-op on databases
  where they already exist correctly.

- Dockerfile-release / docker-entrypoint.sh: the OIDC token exchange
  (OAuthProcess::handleToken(), a server-to-server HTTPS call from LMS
  to the provider's token endpoint) has no way to trust a private/
  internal CA, so any OIDC provider behind non-publicly-trusted TLS
  fails with 'certificate verify failed' immediately after the user
  authenticates - the callback silently drops back to the login page
  with no user-visible error, and no account ever gets created (the
  auto-registration logic in OIDCAuth::OIDCAuth was already correct;
  it just never got a chance to run). Added ca-certificates + su-exec
  to the runtime image and a docker-entrypoint.sh that runs
  update-ca-certificates against anything mounted into
  /usr/local/share/ca-certificates before dropping privileges and
  exec'ing lms, so operators can trust a custom CA via a volume mount.
2026-08-20 01:00:37 -05:00
owen beb190c518 Dockerfile-release: add missing libwebp build/runtime dependency
The stb image backend (src/libs/image/CMakeLists.txt) does a
pkg_check_modules(WebP REQUIRED IMPORTED_TARGET libwebp), but
Dockerfile-release never installed libwebp-dev/libwebp, so the
release image build failed at the cmake configure step with
'Package libwebp not found'. Added both the Alpine build-time
(libwebp-dev) and runtime (libwebp) packages.
2026-08-19 23:15:09 -05:00
owen 06ca52c261 add OIDC
clang-format Check / Formatting Check (push) Canceled after 0s
Basic Build (Arch) / Build (push) Canceled after 0s
2026-08-19 22:00:14 -05:00
owen bf2fa21e95 fixes 2026-07-29 19:52:37 -05:00
owen d3063bcc7f honor public URL in share links 2026-07-29 10:24:45 -05:00
owen 7059a25728 add web internet radio player 2026-07-29 09:54:53 -05:00
owen 39cd3e4cfe add lots of features 2026-07-29 03:49:50 -05:00