diff --git a/deploy/releases-repo/README.md b/deploy/releases-repo/README.md index 41987b2f..4f3ff4aa 100644 --- a/deploy/releases-repo/README.md +++ b/deploy/releases-repo/README.md @@ -129,8 +129,10 @@ Run `Titano.Server.exe` in a console, or install it as a Windows service from an `Titano.Server.exe --install-service` (remove it with `--uninstall-service`). The service runs as LocalSystem, so it registers only from a copy inside `Program Files` that only administrators can change: install for *All users*, or unpack the zip into a folder under `Program Files`. A console run that was not elevated creates the data folder as your -own account, and the service then refuses it: delete the folder, or make Administrators its owner, before you start the -service. +own account, and the service then refuses it. Either delete the folder (with SQLite this also deletes the server's +database and its accounts), or, before you start the service, give the folder and everything in it to Administrators +and reset its permissions from an administrator prompt: `takeown /F "C:\ProgramData\Titano Server" /A /R`, then +`icacls "C:\ProgramData\Titano Server" /reset /T`. The server makes the folder private again at its next start. ## Translations diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 17608e5a..58763ebd 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -257,7 +257,7 @@ One line per decision: date · decision · alternative · reason. | 2026-10-12 | Maintenance vacuums the SQLite index only when at least 10 % of it is free pages; the dry run reports the reclaimable size. | Vacuum on every run | Rewriting a large index for a few pages holds every writer for nothing. | | 2026-10-12 | Settings › Formats Install opens the Microsoft Store page of the missing extension (ms-windows-store:), falling back to its web page. | Download or bundle codecs | No external processes except OS dialogs (BRIEF §8.6); the Store is the OS route for HEIF/HEVC/RAW extensions. | | 2026-10-12 | Settings › Archive rows show and edit the open archive's archive.json and also seed the archives this PC creates later. The rescan interval is a PC setting. | Keep separate 'defaults for new archives' rows | One set of rows matches Settings.html; the archive is the source of truth (BRIEF §7). | -| 2026-10-12 | TLS mode proxy honours `X-Forwarded-For/Proto/Host` only from `TITANO_TRUSTED_PROXIES` (new variable, also in `server.json`: IP addresses or CIDR networks), by default loopback only. The admin panel shows a *Not via proxy* chip (Dashboard, Settings) when a page did not come through a trusted proxy over HTTPS, and a cookie sign-in refused for that reason answers `proxy_untrusted`, naming the variable. | Trust every peer (as before), or default to loopback plus the RFC 1918 and ULA networks | BRIEF §14.2 keys the 5/min sign-in limit and the audit address on the client IP. Home-network clients reach the HTTP port directly from private addresses (Docker's port publishing keeps them), so trusting private networks let exactly them choose their own address. A proxy in another container is listed by its address or subnet. | +| 2026-10-12 | (Partly superseded by the deployment guidance row below: a proxy is listed by its own fixed address, never a Docker subnet or gateway; Docker's port publishing relays IPv6 clients and the host's own connections from the gateway.) TLS mode proxy honours `X-Forwarded-For/Proto/Host` only from `TITANO_TRUSTED_PROXIES` (new variable, also in `server.json`: IP addresses or CIDR networks), by default loopback only. The admin panel shows a *Not via proxy* chip (Dashboard, Settings) when a page did not come through a trusted proxy over HTTPS, and a cookie sign-in refused for that reason answers `proxy_untrusted`, naming the variable. | Trust every peer (as before), or default to loopback plus the RFC 1918 and ULA networks | BRIEF §14.2 keys the 5/min sign-in limit and the audit address on the client IP. Home-network clients reach the HTTP port directly from private addresses (Docker's port publishing keeps them), so trusting private networks let exactly them choose their own address. A proxy in another container is listed by its own fixed address. | | 2026-10-12 | `TITANO_PUBLIC_HTTP_PORT` and `TITANO_PUBLIC_HTTPS_PORT` (optional, 1–65535) name the host ports a container's ports are published on. The admin panel's HTTP→HTTPS redirect and the LAN beacon use them, otherwise the bound ports. LAN discovery from a container needs host networking (documented, with PostgreSQL then published on loopback). | Drop the redirect, or always advertise the bound ports | The Unraid template lets users remap ports (8443 is often taken), and the redirect and beacon otherwise named the container's internal port. | | 2026-10-12 | Windows data folder: a protected DACL (SYSTEM, Administrators, the server's account; nothing inherited), re-applied at start. The folder and everything in it must be owned by those accounts and contain no symbolic link or junction, checked before the ACL is touched; otherwise the server refuses to start and names the entry. `server.json` is read only after its owner is checked on the open handle. Secrets (`initial-admin-password.txt`, `tls/server.pfx`) are deleted and created anew with an explicit private DACL; elsewhere they get mode 0600. On Windows this replaces the 'owner-only file' wording of the 2026-10-02 sign-in row. | Reset foreign owners to Administrators, or keep %ProgramData%'s inherited ACL | A folder or file another user created keeps its owner's WRITE_DAC whatever the DACL says, and its contents (`server.json`, `titano.db`, `server.pfx`) are theirs, so resetting the owner would launder them. A link would carry the ACL rewrite and the server's writes elsewhere. | | 2026-10-12 | `--install-service` registers the LocalSystem service only from a program folder (and, under `dotnet`, a host folder) inside `%ProgramFiles%` or `%ProgramFiles(x86)%`, where no ACL entry gives change rights to an account other than SYSTEM, Administrators, TrustedInstaller or the registering administrator. Otherwise it exits 1 with a localized reason. | Register from anywhere, or only warn | A SYSTEM service runs whatever sits at its image path. A per-user install or a zip unpacked elsewhere would hand SYSTEM to any program of that user (CWE-732). | @@ -325,7 +325,7 @@ One line per decision: date · decision · alternative · reason. | 2026-10-12 | Setup asks programs to close before touching any service. On install it stops the running services, then installs, then prunes services whose program is gone and starts exactly the ones it stopped, whatever their start type. On uninstall it deletes the services only once the programs have closed, just before the files go. Any failure after a stop starts those services again. | Stop or delete services first; start every automatic service after an upgrade | A program refusing to close left the Server stopped, or its service already deleted, and a failed upgrade left it down until reboot. An administrator's deliberately stopped service, or a running demand-start one, keeps its state. | | 2026-10-12 | User data ownership in %LOCALAPPDATA%\Titano: entries starting with `uploader` (also inside `logs`) are the Uploader's, everything else the desktop app's. 'Remove my data' offers only the data of the uninstalled product's components that no other registered Titano product (same Publisher) has. A product whose folder or log cannot be read now counts as using all of it. | Delete the whole folder; hide the option whenever another product is registered | The products share the folder. An offline drive or damaged log must not make a still-installed product's index or upload queue look orphaned. A stale entry only hides the option, which is the safe direction. | | 2026-10-12 | A shortcut that starts an existing program elsewhere is not created or retargeted, but it is logged. When the product it starts is uninstalled (or an upgrade drops it), the shortcut is pointed at the same program of another installation of the same scope whose log lists it, and only deleted when there is none. | Each product overwrites and deletes the shared 'Titano Uploader' shortcuts; distinct names per product | Both products ship the Uploader under the same shortcut name. The program that stays installed keeps its Start menu and desktop shortcuts, and neither uninstall touches the other's. | -| 2026-10-12 | Sign-in entry cleanup: SetupRegistry.DeleteStartupEntries removes the client's ('Titano') and the Uploader's ('Titano Uploader') Run values, named by Core/IO/StartupCommand, only when they start a program the install log lists. This happens on uninstall and on an upgrade that drops that program. | Every Run value under the folder (first version); the folder-scoped variant of fix/shell-notify | Nothing outside Titano's own value names and installed programs is touched, so a portable copy in a subfolder keeps its entry. | +| 2026-10-12 | Sign-in entry cleanup: SetupRegistry.DeleteStartupEntries removes the client's ('Titano') and the Uploader's ('Titano Uploader') Run values, named by Core/IO/StartupCommand, only when they start a program the install log lists. This happens on uninstall, and on an upgrade that drops the program's component; an upgrade that renames the program moves the entry instead (see the sign-in entry move row below). | Every Run value under the folder (first version); the folder-scoped variant of fix/shell-notify | Nothing outside Titano's own value names and installed programs is touched, so a portable copy in a subfolder keeps its entry. | | 2026-10-12 | 'Maintenance release.' is written whenever no section or breaking entry was written, also under a title. | Test the output length | release.yml always passes a title, so the old check never fired (BRIEF §19.3). | | 2026-10-12 | A frame read from its proxy (an original this host cannot decode) records no decode tier: thumbnails drawn from the proxy, and renders or analyses that read it, leave the original's tier and flags as they are. | Record the proxy's tier | The tier describes the original on this host (BRIEF §8.2); a proxy that decodes says nothing about it, and its Undecodable flag must stay so renders keep reading the proxy. | | 2026-10-12 | *Reset all* also turns *Start with Windows* off; importing a settings file leaves it alone. | Keep the sign-in entry on reset | The entry belongs to this copy and lives in the registry, not in the settings file; its default is off, and a settings file from another PC says nothing about this copy. |