27 Commits

Author SHA1 Message Date
Isaac Connor
684b0ab38b fix: escape URL in wget() to prevent command injection in camera probe (GHSA-745h-vg7c-73cg)
The wget() function in monitor_probe.php passed its URL argument directly
to exec() without shell escaping. Since probe credentials (username and
password from the camera discovery UI) are embedded in the URL by callers
like probeHikvision, probeAvigilon, and probeVivotek, an authenticated
user with Monitors Edit permission could inject shell metacharacters via
the Camera Username or Password fields to execute arbitrary commands.

Fix: use escapeshellarg() on the URL argument to exec().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:56:03 -04:00
Isaac Connor
f127359fe0 feat: add network probe function for Uniview cameras
Add probeUniview() that queries the camera's LAPI for device model,
name, resolution, and codec. Uses RTSP main stream URL format
rtsp://ip:554/media/video1 and LAPI snapshot endpoint for thumbnails.
Includes OUI alias probeZhejiangUniviewTechnologiesCoLtd for IEEE
vendor name matching. Adds all 4 registered Uniview MAC OUI prefixes
(48ea63, 6cf17e, 88263f, c47905) to MacVendors.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:17:58 -05:00
Isaac Connor
7df902abdc fix: resolve "no url in button" when adding detected cameras
- Provide default rtsp://<ip>/ monitor entry for cameras discovered
  via ARP that lack a vendor-specific probe function, so they always
  have a URL for the Add button
- Only render the Add button and populate ProbeResults when url is
  non-empty, preventing the "No url in button" alert
- Fix curl_getinfo() called after curl_close() which broke HTTP
  response body parsing in probe functions
- Add missing break in import switch case to prevent fall-through
  to default warning

maybe fixes #4613

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:55:32 -05:00
copilot-swe-agent[bot]
3d8399bfab fix: Use numeric constant for CURLE_PEER_FAILED_VERIFICATION in PHP
The CURLE_PEER_FAILED_VERIFICATION constant may not be defined in all PHP curl versions. Use the numeric value (51) instead for better compatibility.

refs #TBD

Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
2026-02-02 14:36:00 +00:00
copilot-swe-agent[bot]
bce080c735 feat: Enable SSL certificate verification with fallback for all components
Enable TLS peer certificate verification by default in all components that communicate over HTTPS. If SSL verification fails, log a warning and retry without verification to maintain backward compatibility with cameras using self-signed certificates.

Changes:
- C++ (zm_monitor_go2rtc.cpp): Enable SSL verification for all curl operations (3 locations)
- C++ (zm_monitor_rtsp2web.cpp): Enable SSL verification for all curl operations (3 locations)
- PHP (monitor_probe.php): Enable SSL verification with fallback logic
- Perl (Dahua.pm): Enable SSL verification with LWP::UserAgent
- Perl (TapoC520WS_ONVIF.pm): Enable SSL verification with retry logic in request methods

refs #TBD

Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
2026-02-02 14:34:19 +00:00
Isaac Connor
164c4b9117 Default password for Amcrest is admin, pass Manufacturer to monitor creation 2025-09-06 11:37:59 -04:00
Isaac Connor
414b28d42a Update style of variable embeddeding in string. php complains now 2024-05-31 14:53:45 -04:00
Isaac Connor
48015e6efd Remove extra / and urlencode password for Amcrest 2024-02-02 11:49:44 -05:00
Isaac Connor
fdc500304b Add test to see if php-curl is installed instead of crashing. 2023-10-12 11:04:55 -04:00
Charlie Root
fccebee056 Add -a to arp, add ZM_PATH_OUI for path to ieee-oui.txt 2023-09-13 10:14:49 -07:00
Isaac Connor
9a229a78a5 Fix missing mac key on cameras array 2023-08-14 13:30:24 -04:00
Isaac Connor
00bd2259a3 Midly improve dlink support. Fix for probing an undefined array 2023-08-08 18:34:44 -04:00
Isaac Connor
bd3aac1cf6 Fixup curl() and Axis probing 2023-07-25 12:32:35 -04:00
Isaac Connor
c0b5bbf8cc Rough in Hanwha support. Fix results getting overwritten 2023-07-21 14:26:39 -07:00
Isaac Connor
f46ef094dc Merge envserv:sandbox/ZoneMinder 2023-07-17 15:37:12 -04:00
IPC
65d37e7a36 Rough in a Grandstream detector 2023-07-17 14:36:28 -05:00
Isaac Connor
64057eec95 ROugh in Foscam and DLink detections 2023-07-15 10:29:54 -04:00
Isaac Connor
ccdbb8edf6 Improve Avigilon detection 2023-06-22 13:31:01 -04:00
Isaac Connor
b0e29c9be7 Fix downloading of Ffmpeg type monitors 2023-05-30 20:47:05 -04:00
Isaac Connor
22bd680e40 FIx :: 2023-05-16 10:23:39 -04:00
Isaac Connor
d189d820a8 Don't log errors from port_open, don't close the unopened fp 2023-05-15 10:47:54 -04:00
Isaac Connor
37e711d684 Add port_open function, improve Ubiquiti probing, check for open port on 554 before saying it's a camera 2023-05-15 10:03:34 -04:00
Isaac Connor
ef424a39b6 Improve Amcrest detection with snapshot image. Fix using auth from monitor overriding other cameras 2023-05-12 13:15:55 -04:00
Isaac Connor
d522ef677a Add Avigilon, loading of arp-scan oui database and showing of all devices instead of just recognized cameras. Remove the : from mac addresses to match OUI dbs 2023-05-12 12:59:53 -04:00
Isaac Connor
bf113217f2 Improve Axis detection 2023-04-26 14:15:08 -04:00
Isaac Connor
5f8c80698e Improve Ubiquiti snapshot jpeg support 2023-04-22 13:32:42 -04:00
Isaac Connor
4d8d4b6ee5 Update add_monitors to make it scan the network. 2023-04-21 17:52:14 -04:00