mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-21 12:09:31 -04:00
The hand-rolled regex in open() mis-parsed a stream Path that carried no credentials, e.g. rtsp://10.0.0.4:554/cam: the greedy [^:@]+ consumed the host as the username, 554 as the password, and ADDRESS backtracked to the single digit 4. The control daemon then dialled http://...@4, producing "Can't connect to 4:80 (Connection timed out)". Replace the regex with the shared URI-based Control.pm guess_credentials(), which handles ControlAddress and Path, converts rtsp to http, and falls back to the Monitor User/Pass. Create the LWP::UserAgent before parsing since guess_credentials() sets credentials on it. The Grandstream login wire protocol (challenge/authcode and old-style fallback) is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>