Playback server grants unauthenticated access to recordings of every path when legacy readUser/readPass credentials are used
Description
MediaMTX still supports the deprecated per-path credential parameters (readUser, readPass, readIPs, publishUser, publishPass, publishIPs). When any of them is detected, Conf.Validate() in internal/conf/conf.go migrates them to the authInternalUsers system and rebuilds AuthInternalUsers from scratch. Each path's readUser is mapped, in Path.validate() in internal/conf/path.go, to a user with only an AuthActionRead permission scoped to that path.
The migration block also unconditionally prepended a catch-all entry with User: "any", no password, no IP restriction, and a path-less AuthActionPlayback permission. Since any matches every client regardless of the credentials sent, and since a permission without Path applies to every path, the playback server's /list and /get endpoints authorized every request for every path. Credentials, wrong or missing, were never checked.
As a result, an operator who protected a path with readUser/readPass and enabled recording got a live stream (HLS, RTSP, WebRTC and so on) that correctly required credentials. The recordings of the same path were exposed through the playback server to anyone who could reach its port. They could be listed with /list and downloaded as MP4 with /get. This is a missing authorization flaw (CWE-862). Only deployments that use the deprecated legacy credentials, have the playback server enabled and record at least one path are affected. Deployments that use authInternalUsers directly are not.
The fix was made in PR #6311. It removes the path-less any/AuthActionPlayback entry from the legacy migration block. It also makes each readUser map to an additional AuthActionPlayback permission scoped to the same path as its AuthActionRead permission. The playback server now enforces the same credentials as the live read surface.