Every request (19 builders) put the user name, profile / preset / node
tokens, preset name, stream and protocol into the SOAP XML unescaped.
A user name such as "a&b" or a token containing "&" or "<" made the
request malformed. The camera rejected it, and the UI reported "Provided
Credentials are Wrong!".
- _xesc() / _xescAll(): htmlspecialchars(ENT_XML1 | ENT_QUOTES, UTF-8)
on string values. Numbers and booleans are replaced as before.
- The password itself is not affected: only its digest is sent.
Tested against a fake ONVIF camera with user "us&er<1>", password
'p&ss"word' and profile token "main&0", adding the camera on a custom
port. Before, the camera got malformed XML after GetSystemDateAndTime.
Now the camera, its login and its stream are stored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16