Files
zoneminder/scripts
Isaac Connor 74ffa45c7e fix: preserve port and decode url-encoded passwords in parse_ControlAddress
The credential-handling rewrite of the address captured only the host
([^:/]+) and rebuilt the address without the port or path, and the
http/https branches below then forced the port to 80/443 regardless of
what the operator configured. Any ControlAddress with credentials and a
non-standard port resolved to port 80.

Capture the full remainder after the @ so port and path survive, and
take the port from URI->port() which returns the explicit port or the
scheme default.

The pre-escape applied to legacy non-url-encoded passwords also escaped
% itself, so a url-encoded password (e.g. %40 for @) round-tripped
still encoded instead of decoding, and ua->credentials() then received
the wrong password for basic auth. Leave % unescaped so encoded
passwords decode while legacy raw passwords still pass through
unchanged.

Verified with parse_ControlAddress over: plain credentials with default
and non-standard ports, url-encoded @ in password, legacy raw passwords
containing space and literal %, full URL with path, credential-less
host:port, and https default port.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:06:54 -04:00
..
2016-11-07 16:08:43 -05:00
2023-07-05 01:03:48 +02:00
2013-03-17 00:45:21 +01:00
2013-03-17 00:45:21 +01:00
2020-06-30 18:58:46 -04:00
2023-07-05 01:03:48 +02:00
2024-11-05 13:12:12 -05:00