From 7122514a69b790462d375d81c8992275ac56fe91 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 11 Aug 2023 17:48:34 -0400 Subject: [PATCH 1/7] Add CURLOPT_SSL_VERIFYHOST an PEER so that SSL works.. not sure why SSL doesn't work. Add more debug and fix logic inversion on status result. --- src/zm_monitor_rtsp2web.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/zm_monitor_rtsp2web.cpp b/src/zm_monitor_rtsp2web.cpp index f75f29357..38d63310e 100644 --- a/src/zm_monitor_rtsp2web.cpp +++ b/src/zm_monitor_rtsp2web.cpp @@ -69,6 +69,9 @@ int Monitor::RTSP2WebManager::check_RTSP2Web() { curl_easy_setopt(curl, CURLOPT_URL,endpoint.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); CURLcode res = curl_easy_perform(curl); curl_easy_cleanup(curl); @@ -118,18 +121,20 @@ int Monitor::RTSP2WebManager::add_to_RTSP2Web() { curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData.c_str()); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); res = curl_easy_perform(curl); curl_easy_cleanup(curl); if (res != CURLE_OK) { - Error("Failed to curl_easy_perform adding rtsp stream"); + Error("Failed to curl_easy_perform adding rtsp stream %s", curl_easy_strerror(res)); return -1; } Debug(1, "Adding stream response: %s", remove_newlines(response).c_str()); //scan for missing session or handle id "No such session" "no such handle" - if (response.find("\"status\": 1") != std::string::npos) { - Warning("RTSP2Web failed adding stream"); + if (response.find("\"status\": 1") == std::string::npos) { + Warning("RTSP2Web failed adding stream, response: %s", response.c_str()); return -2; } @@ -148,6 +153,8 @@ int Monitor::RTSP2WebManager::remove_from_RTSP2Web() { curl_easy_setopt(curl, CURLOPT_URL,endpoint.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); CURLcode res = curl_easy_perform(curl); if (res != CURLE_OK) { From d21d53eeb91fa5357877e5173f1978d13c46f1f1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 12 Aug 2023 14:50:30 -0400 Subject: [PATCH 2/7] Remove reorder_queue_size when re-parsing opts to avoid warnings --- src/zm_videostore.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 9f07a5591..301116365 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -372,6 +372,14 @@ bool VideoStore::open() { ret = av_dict_parse_string(&opts, options.c_str(), "=", ",#\n", 0); if (ret < 0) { Warning("Could not parse ffmpeg encoder options list '%s'", options.c_str()); + } else { + const AVDictionaryEntry *entry = av_dict_get(opts, "reorder_queue_size", nullptr, AV_DICT_MATCH_CASE); + if (entry) { + reorder_queue_size = std::stoul(entry->value); + Debug(1, "reorder_queue_size set to %zu", reorder_queue_size); + // remove it to prevent complaining later. + av_dict_set(&opts, "reorder_queue_size", nullptr, AV_DICT_MATCH_CASE); + } } if ((ret = avcodec_open2(video_out_ctx, video_out_codec, &opts)) < 0) { if (wanted_encoder != "" and wanted_encoder != "auto") { From a5d83e61b43c77ee61cec8613e9c63fbc039b457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Sun, 13 Aug 2023 01:20:29 +0200 Subject: [PATCH 3/7] Corrections on rst files --- docs/api.rst | 4 ++-- docs/faq.rst | 4 ++-- docs/installationguide/debian.rst | 4 ++-- docs/installationguide/easydocker.rst | 2 +- docs/installationguide/multiserver.rst | 4 ++-- docs/installationguide/packpack.rst | 2 +- docs/installationguide/redhat.rst | 4 ++-- docs/userguide/definemonitor.rst | 2 +- docs/userguide/filterevents.rst | 2 +- docs/userguide/gettingstarted.rst | 4 ++-- docs/userguide/options/options_api.rst | 2 +- docs/userguide/options/options_bw.rst | 2 +- docs/userguide/options/options_config.rst | 4 ++-- docs/userguide/options/options_storage.rst | 2 +- docs/userguide/options/options_system.rst | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index dce0e25cc..711108138 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -414,7 +414,7 @@ This returns number of events per monitor that were recorded in the last one hou curl "http://server/zm/api/events/consoleEvents/1%20hour.json" -This returns number of events per monitor that were recorded in the last day where there were atleast 10 frames that were alarms" +This returns number of events per monitor that were recorded in the last day where there were at least 10 frames that were alarms" :: @@ -645,7 +645,7 @@ will display a live feed from monitor id 1, scaled down by 50% in quality and re PTZ on live streams ------------------- -PTZ commands are pretty cryptic in ZoneMinder. This is not meant to be an exhaustive guide, but just something to whet your appetite: +PTZ commands are pretty cryptic in ZoneMinder. This is not meant to be an exhaustive guide, but just something to wet your appetite: Lets assume you have a monitor, with ID=6. Let's further assume you want to pan it left. diff --git a/docs/faq.rst b/docs/faq.rst index f23fa2fc1..74ac5f985 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -115,7 +115,7 @@ A sample output on Ubuntu: tmpfs 2.6G 923M 1.7G 36% /run/shm -The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing ``Use%`` going beyond 70% you should probaby increase the mapped memory. +The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing ``Use%`` going beyond 70% you should probably increase the mapped memory. For example, if you want to increase this limit to 70% of your memory, add the following to ``/etc/fstab`` ``tmpfs SHMPATH tmpfs defaults,noexec,nosuid,size=70% 0 0`` @@ -432,7 +432,7 @@ Here are some commands to get information about your hardware. Some commands are * ``[[zmu]] -m 0 -q -v`` -- Returns various information regarding a monitor configuration. * ``[[ipcs]] `` -- Provides information on the ipc facilities for which the calling process has read access. * ``[[ipcrm]] `` -- The ipcrm command can be used to remove an IPC object from the kernel. -* ``cat /proc/interrupts`` -- This will dispaly what interrupts your hardware is using. +* ``cat /proc/interrupts`` -- This will display what interrupts your hardware is using. Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/installationguide/debian.rst b/docs/installationguide/debian.rst index f2d943555..4be860a56 100644 --- a/docs/installationguide/debian.rst +++ b/docs/installationguide/debian.rst @@ -70,7 +70,7 @@ To install the version in bookworm stable, just run the following command. If instead you prefer to install the newer version using backports, run the following commands. The first line will add this bookworm-backports repository. -The backports repository is deactivated by default, so with the second line we explicityly state we want the backported version of zoneminder. +The backports repository is deactivated by default, so with the second line we explicitly state we want the backported version of zoneminder. :: @@ -171,7 +171,7 @@ To install the version in bullseye stable, just run the following command. If instead you prefer to install the newer version using backports, run the following commands. The first line will add bullseye-backports repository. -The backports repository is deactivated by default, so with the second line we explicityly state we want the backported version of zoneminder. +The backports repository is deactivated by default, so with the second line we explicitly state we want the backported version of zoneminder. :: diff --git a/docs/installationguide/easydocker.rst b/docs/installationguide/easydocker.rst index a7d37a9e5..4f9b3b8ef 100644 --- a/docs/installationguide/easydocker.rst +++ b/docs/installationguide/easydocker.rst @@ -1,6 +1,6 @@ An Easy To Use Docker Image =========================== -If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repostory. He maintains two repositories: +If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repository. He maintains two repositories: * If you want to run the latest stable release, please use his `zoneminder machine learning repository `__. * If you want to run the latest zoneminder master, please use his `zoneminder master repository `__. diff --git a/docs/installationguide/multiserver.rst b/docs/installationguide/multiserver.rst index ce1cd26e6..e3306b692 100644 --- a/docs/installationguide/multiserver.rst +++ b/docs/installationguide/multiserver.rst @@ -25,7 +25,7 @@ New installs For systemd based linux distros, inspect the zoneminder service file, typically found under /lib/systemd/system. Changes may be required for multiserver to function correctly. For example, the service file may check for a running instance of mysql or mariadb running locally on the server. This check will need to be removed. Rather than edit the service file directly, copy the service file to /etc/systemd/system and edit the file in that location. -2. On each ZoneMinder server, edit zm.conf. Find the ZM_DB_HOST variable and set it to the name or ip address of your Database Server. Find the ZM_SERVER_HOST and enter a name for this ZoneMinder server. Use a name easily recognizable by you. This name is not used by ZoneMinder for dns or any other form of network conectivity. +2. On each ZoneMinder server, edit zm.conf. Find the ZM_DB_HOST variable and set it to the name or ip address of your Database Server. Find the ZM_SERVER_HOST and enter a name for this ZoneMinder server. Use a name easily recognizable by you. This name is not used by ZoneMinder for dns or any other form of network connectivity. 3. Copy the file /usr/share/zoneminder/db/zm_create.sql from one of the ZoneMinder Servers to the machine targeted as the Database Server. @@ -52,7 +52,7 @@ Note that these commands are just an example and might not be secure enough for .. sidebar :: Note - The location of the ZoneMinder events folder varies by distro. This folder is often found under "/var/lib/zoneminder/events" for RedHat based distros and "/var/cache/zoneminder/events" for Debain based distros. This folder is NOT a Symbolic Link! + The location of the ZoneMinder events folder varies by distro. This folder is often found under "/var/lib/zoneminder/events" for RedHat based distros and "/var/cache/zoneminder/events" for Debian based distros. This folder is NOT a Symbolic Link! 10. Open your browser and point it to the web console on any of the ZoneMinder Servers (they will all be the same). Open Options, click the Servers tab,and populate this screen with all of your ZoneMinder Servers. Each server has a field for its name and its hostname. The name is what you used for ZM_SERVER_HOST in step 2. The hostname is the network name or ip address ZoneMinder should use. diff --git a/docs/installationguide/packpack.rst b/docs/installationguide/packpack.rst index 64a6b4004..9361c1165 100644 --- a/docs/installationguide/packpack.rst +++ b/docs/installationguide/packpack.rst @@ -27,7 +27,7 @@ Procedure - If the desired distro is not in the first list, then open the `packpack project README `_ and check if the desired distro is theoretically supported. If it is, then continue to step 2 with the understanding that you are heading out into uncharted territory. There could be problems. -- If the desired distro does not appear in either list, then unfortuantely you cannot use the procedure described here. +- If the desired distro does not appear in either list, then unfortunately you cannot use the procedure described here. - If the desired distro architecture is arm, refer to `Appendix A - Enable Qemu On the Host`_ to enable qemu emulation on your amd64 host machine. diff --git a/docs/installationguide/redhat.rst b/docs/installationguide/redhat.rst index b2f175e01..b7f1486bc 100644 --- a/docs/installationguide/redhat.rst +++ b/docs/installationguide/redhat.rst @@ -73,7 +73,7 @@ Install ZoneMinder for Apache web server: .. sidebar :: Note - A virtual package called zoneminder exists. This package contains no files and will pull in the zoneminder-httpd package for backwards compatiblity. + A virtual package called zoneminder exists. This package contains no files and will pull in the zoneminder-httpd package for backwards compatibility. :: @@ -213,7 +213,7 @@ Now clone the ZoneMinder git repository from your home folder: This will create a sub-folder called zoneminder, which will contain the latest development source code. -If you have previsouly cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead: +If you have previously cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead: :: diff --git a/docs/userguide/definemonitor.rst b/docs/userguide/definemonitor.rst index 35306fb5b..6268de20d 100644 --- a/docs/userguide/definemonitor.rst +++ b/docs/userguide/definemonitor.rst @@ -150,7 +150,7 @@ Orientation WebSite ^^^^^^^ -This Source Type allows one to configure an arbitrary website as a non-recordable, fully interactive, monitor in ZoneMinder. Note that sites with self-signed certificates will not display until the end user first manually navigates to the site and accpets the unsigned certificate. Also note that some sites will set an X-Frame option in the header, which discourages their site from being displayed within a frame. ZoneMinder will detect this condition and present a warning in the log. When this occurs, the end user can choose to install a browser plugin or extension to workaround this issue. +This Source Type allows one to configure an arbitrary website as a non-recordable, fully interactive, monitor in ZoneMinder. Note that sites with self-signed certificates will not display until the end user first manually navigates to the site and accepts the unsigned certificate. Also note that some sites will set an X-Frame option in the header, which discourages their site from being displayed within a frame. ZoneMinder will detect this condition and present a warning in the log. When this occurs, the end user can choose to install a browser plugin or extension to workaround this issue. Website URL Enter the full http or https url to the desired website. diff --git a/docs/userguide/filterevents.rst b/docs/userguide/filterevents.rst index 48ed13093..fa02c407e 100644 --- a/docs/userguide/filterevents.rst +++ b/docs/userguide/filterevents.rst @@ -34,7 +34,7 @@ Here is what the filter window looks like * Update used disk space: calculates how much disk space is currently taken by the event and updates the db record. * Create video for all matches: creates a video file of all the events that match * Create video for all matches: ffmpeg will be used to create a video file (mp4) out of all the stored jpgs if using jpeg storage. - * Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceded by replacement arguents. eg: /usr/bin/script.sh %MN% will execute as /usr/bin/script.sh MonitorName /path/to/event. Please note that urls may contain characters like & that need quoting. So you may need to put quotes around them like /usr/bin/scrupt.sh "%MN%". + * Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguments to the command, the last argument will be the absolute path to the event, preceded by replacement arguments. eg: /usr/bin/script.sh %MN% will execute as /usr/bin/script.sh MonitorName /path/to/event. Please note that urls may contain characters like & that need quoting. So you may need to put quotes around them like /usr/bin/scrupt.sh "%MN%". * Delete all matches: Deletes all the matched events. * Email details of all matches: Sends an email to the configured address with details about the event. * Copy all matches: copies the event files to another location, specified in the Copy To dropdown. The other location must be setup in the Storage Tab under options. diff --git a/docs/userguide/gettingstarted.rst b/docs/userguide/gettingstarted.rst index 61d4cb523..561a9fa52 100644 --- a/docs/userguide/gettingstarted.rst +++ b/docs/userguide/gettingstarted.rst @@ -26,7 +26,7 @@ We strongly recommend enabling authentication right away. There are some situati * Enable OPT_USE_AUTH - this automatically switches to authentication mode with a default user (more on that later) * Select a random string for AUTH_HASH_SECRET - this is used to make the authentication logic more secure, so please generate your own string and make sure it is sufficiently randomized and long. Note that if you plan to use APIs with ZoneMinder (needed by zmNinja/other apps), it is mandatory that you have this field populated -* The other options highlighed above should already be set, but if not, please make sure they are +* The other options highlighted above should already be set, but if not, please make sure they are * Note that if you are planning to use zmNinja and plan to use ZM authentication, you must also: * set ``AUTH_RELAY`` to hashed @@ -112,7 +112,7 @@ This brings up the new monitor window: * In Analysis FPS, we've put in 5FPS here. Note that you should not put an FPS that is greater than the camera FPS. In my case, 5FPS is sufficient for my needs .. note:: - Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. Infact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example) + Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. In fact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example) * We are done for the General tab. Let's move to the next tab diff --git a/docs/userguide/options/options_api.rst b/docs/userguide/options/options_api.rst index 669fcffd3..f80ae4a1d 100644 --- a/docs/userguide/options/options_api.rst +++ b/docs/userguide/options/options_api.rst @@ -2,7 +2,7 @@ Options - API --------------- .. note:: - The ZoneMinder web interface does not use APIs and therefore, the tokens discussed here don't apply to the ZoneMinder UI. These only appy to apps that use the ZoneMinder API, like zmNinja. + The ZoneMinder web interface does not use APIs and therefore, the tokens discussed here don't apply to the ZoneMinder UI. These only apply to apps that use the ZoneMinder API, like zmNinja. The API option screen allows you enable/disable APIs on a per user basis. Furthermore, it also allows you to "revoke" tokens allotted to users. Starting ZoneMinder 1.34, the API ecosystem was overhauled and we now support JWT tokens with a concept of refresh tokens and access tokens. This allows for authentication without the need for sending passwords with each authentication request. For a more detailed understanding of how this works, please refer to :doc:`/api`. Over time, more control will be added to this screen. diff --git a/docs/userguide/options/options_bw.rst b/docs/userguide/options/options_bw.rst index 60be6095f..ba6f0d06e 100644 --- a/docs/userguide/options/options_bw.rst +++ b/docs/userguide/options/options_bw.rst @@ -43,4 +43,4 @@ WEB_H_EVENTS_VIEW, WEB_M_EVENTS_VIEW, WEB_L_EVENTS_VIEW - Stored events can be v WEB_H_SHOW_PROGRESS, WEB_M_SHOW_PROGRESS, WEB_L_SHOW_PROGRESS - When viewing events an event navigation panel and progress bar is shown below the event itself. This allows you to jump to specific points in the event, but can can also dynamically update to display the current progress of the event replay itself. This progress is calculated from the actual event duration and is not directly linked to the replay itself, so on limited bandwidth connections may be out of step with the replay. This option allows you to turn off the progress display, whilst still keeping the navigation aspect, where bandwidth prevents it functioning effectively. -WEB_H_AJAX_TIMEOUT, WEB_M_AJAX_TIMEOUT, WEB_L_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used. \ No newline at end of file +WEB_H_AJAX_TIMEOUT, WEB_M_AJAX_TIMEOUT, WEB_L_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would otherwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used. \ No newline at end of file diff --git a/docs/userguide/options/options_config.rst b/docs/userguide/options/options_config.rst index 648987773..ff211b757 100644 --- a/docs/userguide/options/options_config.rst +++ b/docs/userguide/options/options_config.rst @@ -22,9 +22,9 @@ STRICT_VIDEO_CONFIG - With some video devices errors can be reported in setting LD_PRELOAD - Some older cameras require the use of the v4l1 compat library. This setting allows the setting of the path to the library, so that it can be loaded by zmdc.pl before launching zmc. -V4L_MULTI_BUFFER - Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page. +V4L_MULTI_BUFFER - Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can override them in each individual monitor on the source page. -CAPTURES_PER_FRAME - If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page. +CAPTURES_PER_FRAME - If you are using cameras attached to a video capture card which forces multiple inputs to share one capture chip, it can sometimes produce images with interlaced frames reversed resulting in poor image quality and a distinctive comb edge appearance. Increasing this setting allows you to force additional image captures before one is selected as the captured frame. This allows the capture hardware to 'settle down' and produce better quality images at the price of lesser capture rates. This option has no effect on (a) network cameras, or (b) where multiple inputs do not share a capture chip. This option addresses a similar problem to the ZM_V4L_MULTI_BUFFER option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can override them in each individual monitor on the source page. FORCED_ALARM_SCORE - The 'zmu' utility can be used to force an alarm on a monitor rather than rely on the motion detection algorithms. This option determines what score to give these alarms to distinguish them from regular ones. It must be 255 or less. diff --git a/docs/userguide/options/options_storage.rst b/docs/userguide/options/options_storage.rst index 73dfb574a..634870f05 100644 --- a/docs/userguide/options/options_storage.rst +++ b/docs/userguide/options/options_storage.rst @@ -5,7 +5,7 @@ Options - Storage Storage tab is used to setup storage areas for recorded Events. To add a new area use the Add New Storage button. -By default storage on local drive is automatically set up on installion. When no area is specified events will be +By default storage on local drive is automatically set up on installation. When no area is specified events will be stored to a default built-in location, which for example on Ubuntu is /var/cache/zoneminder/events. Name: Storage names - can be anything diff --git a/docs/userguide/options/options_system.rst b/docs/userguide/options/options_system.rst index 5e6c58c12..f05c863d6 100644 --- a/docs/userguide/options/options_system.rst +++ b/docs/userguide/options/options_system.rst @@ -22,7 +22,7 @@ AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user d AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and passwords. Although these strings are reasonably secure the addition of a random secret increases security substantially. Note that if you are using the new token based APIs, then this field is mandatory with ZM 1.34 and above. -AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failures. +AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermittent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failures. AUTH_HASH_TTL - Time before ZM auth will expire (does not apply to API tokens). The default has traditionally been 2 hours. A new hash will automatically be regenerated at half this value. From 543683aa4c08c0619f9a323da7504062efc0d6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Sun, 13 Aug 2023 01:27:19 +0200 Subject: [PATCH 4/7] Corrections on cpp and h files --- src/bindings.h | 2 +- src/zm_buffer.cpp | 2 +- src/zm_crypt.cpp | 2 +- src/zm_curl_camera.cpp | 4 ++-- src/zm_event.cpp | 2 +- src/zm_ffmpeg.cpp | 4 ++-- src/zm_image.cpp | 24 ++++++++++++------------ src/zm_logger.cpp | 2 +- src/zm_monitor.cpp | 2 +- src/zm_monitorstream.cpp | 4 ++-- src/zm_mqtt.cpp | 2 +- src/zm_remote_camera_http.cpp | 2 +- src/zm_rtsp_server_device_source.h | 2 +- src/zm_rtsp_server_fifo_h264_source.h | 4 ++-- src/zm_stream.cpp | 2 +- src/zm_utils.cpp | 2 +- src/zm_videostore.cpp | 8 ++++---- 17 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/bindings.h b/src/bindings.h index d1f3aa8f0..5fcf865e0 100644 --- a/src/bindings.h +++ b/src/bindings.h @@ -570,7 +570,7 @@ class tev__Capabilities /// Attribute "EventBrokerProtocols" of type xs:string. @ std::string* EventBrokerProtocols 0; ///< Optional attribute. ///
-/// Maxiumum number of event broker configurations that can be added to the device. +/// Maximum number of event broker configurations that can be added to the device. ///
/// /// Attribute "MaxEventBrokers" of type xs:int. diff --git a/src/zm_buffer.cpp b/src/zm_buffer.cpp index 2365e1c39..0f9d68a4b 100644 --- a/src/zm_buffer.cpp +++ b/src/zm_buffer.cpp @@ -87,7 +87,7 @@ int Buffer::read_into(int sd, unsigned int bytes, Microseconds timeout) { Error("Error %d %s from select", errno, strerror(errno)); return rv; } else if (rv == 0) { - Debug(1, "timeout"); /* a timeout occured */ + Debug(1, "timeout"); /* a timeout occurred */ return 0; } diff --git a/src/zm_crypt.cpp b/src/zm_crypt.cpp index f6b6be188..5c5baf0f8 100644 --- a/src/zm_crypt.cpp +++ b/src/zm_crypt.cpp @@ -134,7 +134,7 @@ bool verifyPassword(const char *username, const char *input_password, const char bool password_correct = false; if ( strlen(db_password_hash) < 4 ) { - // actually, shoud be more, but this is min. for next code + // actually, should be more, but this is min. for next code Error("DB Password is too short or invalid to check"); return false; } diff --git a/src/zm_curl_camera.cpp b/src/zm_curl_camera.cpp index ddd7e52cb..da62358af 100644 --- a/src/zm_curl_camera.cpp +++ b/src/zm_curl_camera.cpp @@ -534,10 +534,10 @@ void* cURLCamera::thread_func() { Error("Failed setting password: %s", (*curl_easy_strerror_f)(cRet)); } - /* Authenication preference */ + /* Authentication preference */ cRet = (*curl_easy_setopt_f)(c, CURLOPT_HTTPAUTH, CURLAUTH_ANY); if (cRet != CURLE_OK) - Warning("Failed setting libcurl acceptable http authenication methods: %s", (*curl_easy_strerror_f)(cRet)); + Warning("Failed setting libcurl acceptable http authentication methods: %s", (*curl_easy_strerror_f)(cRet)); /* Work loop */ diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 3481ed4ef..be607611e 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -683,7 +683,7 @@ void Event::Run() { if (packet_queue.empty()) { if (terminate_ or zm_terminate) break; packet_queue_condition.wait(lck); - // Neccessary because we don't hold the lock in the while condition + // Necessary because we don't hold the lock in the while condition } if (!packet_queue.empty()) { packet = packet_queue.front(); diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index 6cbf122e4..3b2bd3779 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -396,7 +396,7 @@ int zm_send_packet_receive_frame(AVCodecContext *context, AVFrame *frame, AVPack // The codec may need more samples than it has, perfectly valid Debug(2, "Codec not ready to give us a frame"); } else { - Error("Could not recieve frame (error %d = '%s')", ret, + Error("Could not receive frame (error %d = '%s')", ret, av_make_error_string(ret).c_str()); } return ret; @@ -422,7 +422,7 @@ int zm_send_frame_receive_packet(AVCodecContext *ctx, AVFrame *frame, AVPacket & return 0; } else if (frame) { // May get EOF if frame is NULL because it signals flushing - Error("Could not recieve packet (error %d = '%s')", ret, + Error("Could not receive packet (error %d = '%s')", ret, av_make_error_string(ret).c_str()); } zm_av_packet_unref(&packet); diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 4addab0ab..87e34cc65 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1604,7 +1604,7 @@ void Image::Overlay( const Image &image ) { subpixelorder, image.subpixelorder); } - /* Grayscale ontop of grayscale - complete */ + /* Grayscale on top of grayscale - complete */ if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_GRAY8 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1618,7 +1618,7 @@ void Image::Overlay( const Image &image ) { psrc++; } - /* RGB24 ontop of grayscale - convert to same format first - complete */ + /* RGB24 on top of grayscale - convert to same format first - complete */ } else if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_RGB24 ) { Colourise(image.colours, image.subpixelorder); @@ -1636,7 +1636,7 @@ void Image::Overlay( const Image &image ) { psrc += 3; } - /* RGB32 ontop of grayscale - convert to same format first - complete */ + /* RGB32 on top of grayscale - convert to same format first - complete */ } else if ( colours == ZM_COLOUR_GRAY8 && image.colours == ZM_COLOUR_RGB32 ) { Colourise(image.colours, image.subpixelorder); @@ -1664,7 +1664,7 @@ void Image::Overlay( const Image &image ) { } } - /* Grayscale ontop of RGB24 - complete */ + /* Grayscale on top of RGB24 - complete */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_GRAY8 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1678,7 +1678,7 @@ void Image::Overlay( const Image &image ) { psrc++; } - /* RGB24 ontop of RGB24 - not complete. need to take care of different subpixel orders */ + /* RGB24 on top of RGB24 - not complete. need to take care of different subpixel orders */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_RGB24 ) { const uint8_t* const max_ptr = buffer+size; const uint8_t* psrc = image.buffer; @@ -1694,11 +1694,11 @@ void Image::Overlay( const Image &image ) { psrc += 3; } - /* RGB32 ontop of RGB24 - TO BE DONE */ + /* RGB32 on top of RGB24 - TO BE DONE */ } else if ( colours == ZM_COLOUR_RGB24 && image.colours == ZM_COLOUR_RGB32 ) { - Error("Overlay of RGB32 ontop of RGB24 is not supported."); + Error("Overlay of RGB32 on top of RGB24 is not supported."); - /* Grayscale ontop of RGB32 - complete */ + /* Grayscale on top of RGB32 - complete */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_GRAY8 ) { const Rgb* const max_ptr = (Rgb*)(buffer+size); Rgb* prdest = (Rgb*)buffer; @@ -1724,11 +1724,11 @@ void Image::Overlay( const Image &image ) { } } - /* RGB24 ontop of RGB32 - TO BE DONE */ + /* RGB24 on top of RGB32 - TO BE DONE */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_RGB24 ) { - Error("Overlay of RGB24 ontop of RGB32 is not supported."); + Error("Overlay of RGB24 on top of RGB32 is not supported."); - /* RGB32 ontop of RGB32 - not complete. need to take care of different subpixel orders */ + /* RGB32 on top of RGB32 - not complete. need to take care of different subpixel orders */ } else if ( colours == ZM_COLOUR_RGB32 && image.colours == ZM_COLOUR_RGB32 ) { const Rgb* const max_ptr = (Rgb*)(buffer+size); Rgb* prdest = (Rgb*)buffer; @@ -1940,7 +1940,7 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres return result; } -/* New function to allow buffer re-using instead of allocationg memory for the delta image every time */ +/* New function to allow buffer re-using instead of allocating memory for the delta image every time */ void Image::Delta(const Image &image, Image* targetimage) const { if ( !(width == image.width && height == image.height && colours == image.colours && subpixelorder == image.subpixelorder) ) { Panic( "Attempt to get delta of different sized images, expected %dx%dx%d %d, got %dx%dx%d %d", diff --git a/src/zm_logger.cpp b/src/zm_logger.cpp index 220721e82..7150f390f 100644 --- a/src/zm_logger.cpp +++ b/src/zm_logger.cpp @@ -507,7 +507,7 @@ void Logger::logPrint(bool hex, const char *filepath, int line, int level, const if (level <= mFileLevel) { if (!mLogFileFP) { // FIXME unlocking here is a problem. Another thread could sneak in. - // We are using a recursive mutex so unlocking shouldn't be neccessary + // We are using a recursive mutex so unlocking shouldn't be necessary //log_mutex.unlock(); // We do this here so that we only create the file if we ever write to it. openFile(); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index f05e5cbd9..804191f6d 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -79,7 +79,7 @@ struct Namespace namespaces[] = #endif // This is the official SQL (and ordering of the fields) to load a Monitor. -// It will be used whereever a Monitor dbrow is needed. WHERE conditions can be appended +// It will be used wherever a Monitor dbrow is needed. WHERE conditions can be appended std::string load_monitor_sql = "SELECT `Id`, `Name`, `Deleted`, `ServerId`, `StorageId`, `Type`, `Capturing`+0, `Analysing`+0, `AnalysisSource`+0, `AnalysisImage`+0," "`Recording`+0, `RecordingSource`+0, `Decoding`+0, `RTSP2WebEnabled`, `RTSP2WebType`," diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index b1aada9bb..fce4bbebc 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -713,7 +713,7 @@ void MonitorStream::runStream() { } if (!sendFrame(send_image, last_frame_timestamp)) { - Debug(2, "sendFrame failed, quiting."); + Debug(2, "sendFrame failed, quitting."); zm_terminate = true; break; } @@ -722,7 +722,7 @@ void MonitorStream::runStream() { // Chrome will not display the first frame until it receives another. // Firefox is fine. So just send the first frame twice. if (!sendFrame(send_image, last_frame_timestamp)) { - Debug(2, "sendFrame failed, quiting."); + Debug(2, "sendFrame failed, quitting."); zm_terminate = true; break; } diff --git a/src/zm_mqtt.cpp b/src/zm_mqtt.cpp index 468e355b0..216ce1d9d 100644 --- a/src/zm_mqtt.cpp +++ b/src/zm_mqtt.cpp @@ -96,7 +96,7 @@ void MQTT::addValue(std::string name, double value) { sensorListIterator = sensorList.find(name); Debug(1, "found sensor: %s", sensorListIterator->first.c_str()); // if(it == sensorList.end()) { - // clog<<__FUNCTION__<<" Could not find coresponding sensor name"< > splitFrames(unsigned char* frame, unsigned frameSize); - // overide FramedSource + // override FramedSource virtual void doGetNextFrame(); virtual void doStopGettingFrames(); virtual unsigned char *extractFrame(unsigned char *data, size_t& size, size_t& outsize); diff --git a/src/zm_rtsp_server_fifo_h264_source.h b/src/zm_rtsp_server_fifo_h264_source.h index cf605f40a..51ca5e6d5 100644 --- a/src/zm_rtsp_server_fifo_h264_source.h +++ b/src/zm_rtsp_server_fifo_h264_source.h @@ -53,7 +53,7 @@ class H264_ZoneMinderFifoSource : public H26X_ZoneMinderFifoSource { const std::string &fifo ); - // overide ZoneMinderFifoSource + // override ZoneMinderFifoSource virtual std::list< std::pair > splitFrames(unsigned char* frame, size_t &frameSize) override; }; @@ -66,7 +66,7 @@ class H265_ZoneMinderFifoSource : public H26X_ZoneMinderFifoSource { const std::string &fifo ); - // overide ZoneMinderFifoSource + // override ZoneMinderFifoSource virtual std::list< std::pair > splitFrames(unsigned char* frame, size_t &frameSize) override; protected: diff --git a/src/zm_stream.cpp b/src/zm_stream.cpp index 4f0ad11ed..0340b0c8f 100644 --- a/src/zm_stream.cpp +++ b/src/zm_stream.cpp @@ -401,7 +401,7 @@ void StreamBase::closeComms() { } // Can't delete any files because another zms might have come along and opened them and is waiting on the lock. if ( lock_fd > 0 ) { - close(lock_fd); //close it rather than unlock it incase it got deleted. + close(lock_fd); //close it rather than unlock it in case it got deleted. } } } // end void StreamBase::closeComms diff --git a/src/zm_utils.cpp b/src/zm_utils.cpp index 3caa257b2..4d2075232 100644 --- a/src/zm_utils.cpp +++ b/src/zm_utils.cpp @@ -474,7 +474,7 @@ std::string mask_authentication(const std::string &url) { std::size_t password_at = masked_url.rfind(":", at_at); if (password_at == std::string::npos) { - // no : means no http:// either so something liek username@192.168.1.1 + // no : means no http:// either so something like username@192.168.1.1 masked_url.replace(0, at_at, at_at, '*'); } else if (masked_url[password_at+1] == '/') { // no password, something like http://username@192.168.1.1 diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 301116365..4bbe0c98c 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -246,7 +246,7 @@ bool VideoStore::open() { ret = avcodec_parameters_from_context(video_out_stream->codecpar, video_out_ctx); if (ret < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); } av_dict_free(&opts); // Reload it for next attempt and/or avformat open @@ -431,7 +431,7 @@ bool VideoStore::open() { video_out_stream = avformat_new_stream(oc, nullptr); ret = avcodec_parameters_from_context(video_out_stream->codecpar, video_out_ctx); if (ret < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); return false; } } // end if copying or transcoding @@ -510,7 +510,7 @@ bool VideoStore::open() { } #if LIBAVUTIL_VERSION_CHECK(57, 28, 100, 28, 0) - /* Seems like technically we could have multple channels, so let's not implement this for ffmpeg 5 */ + /* Seems like technically we could have multiple channels, so let's not implement this for ffmpeg 5 */ #else if (audio_out_ctx->channels > 1) { Warning("Audio isn't mono, changing it."); @@ -869,7 +869,7 @@ bool VideoStore::setup_resampler() { audio_out_stream->time_base = (AVRational){1, audio_out_ctx->sample_rate}; if ((ret = avcodec_parameters_from_context(audio_out_stream->codecpar, audio_out_ctx)) < 0) { - Error("Could not initialize stream parameteres"); + Error("Could not initialize stream parameters"); return false; } zm_dump_codecpar(audio_out_stream->codecpar); From a93b67c9d8b9db9f5cfd52c9787ebf6f78b94e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Sun, 13 Aug 2023 16:47:04 +0200 Subject: [PATCH 5/7] Fixed eslint checks --- web/skins/classic/js/skin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index cb8db7166..d0150eeb0 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -302,7 +302,9 @@ if ( currentView != 'none' && currentView != 'login' ) { // Manage the web console filter bar minimize chevron $j("#mfbflip").click(function() { - $j("#mfbpanel").slideToggle("slow", function() { changeScale(); }); + $j("#mfbpanel").slideToggle("slow", function() { + changeScale(); + }); var mfbflip = $j("#mfbflip"); if ( mfbflip.html() == 'keyboard_arrow_up' ) { mfbflip.html('keyboard_arrow_down'); From 8e17d9075b5a8395ef196399d19ff9235edf89fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Sun, 13 Aug 2023 18:57:36 +0200 Subject: [PATCH 6/7] Onvif corrections --- onvif/modules/lib/ONVIF/Client.pm | 2 +- .../lib/ONVIF/Deserializer/MessageParser.pm | 2 +- .../Analytics/Types/EventSubscription.pm | 2 +- .../proxy/lib/ONVIF/Analytics/Types/Layout.pm | 2 +- .../Types/RecordingSourceInformation.pm | 2 +- .../ONVIF/Analytics/Types/SystemDateTime.pm | 2 +- .../ONVIF/Device/Types/EventSubscription.pm | 2 +- onvif/proxy/lib/ONVIF/Device/Types/Layout.pm | 2 +- .../Types/RecordingSourceInformation.pm | 2 +- .../lib/ONVIF/Device/Types/SystemDateTime.pm | 2 +- .../ONVIF/Media/Types/EventSubscription.pm | 2 +- onvif/proxy/lib/ONVIF/Media/Types/Layout.pm | 2 +- .../Media/Types/RecordingSourceInformation.pm | 2 +- .../lib/ONVIF/Media/Types/SystemDateTime.pm | 2 +- .../lib/ONVIF/PTZ/Types/EventSubscription.pm | 2 +- onvif/proxy/lib/ONVIF/PTZ/Types/Layout.pm | 2 +- .../PTZ/Types/RecordingSourceInformation.pm | 2 +- .../lib/ONVIF/PTZ/Types/SystemDateTime.pm | 2 +- onvif/wsdl/devicemgmt.wsdl | 16 +++---- onvif/wsdl/onvif-local.xsd | 42 +++++++++---------- onvif/wsdl/onvif.xsd | 42 +++++++++---------- onvif/wsdl/ptz.wsdl | 2 +- 22 files changed, 69 insertions(+), 69 deletions(-) diff --git a/onvif/modules/lib/ONVIF/Client.pm b/onvif/modules/lib/ONVIF/Client.pm index 738621ded..636eb3a7c 100644 --- a/onvif/modules/lib/ONVIF/Client.pm +++ b/onvif/modules/lib/ONVIF/Client.pm @@ -250,7 +250,7 @@ sub create_user { sub set_credentials { my ($self, $username, $password, $create_if_not_exists) = @_; -# TODO: snyc device and client time +# TODO: sync device and client time if ( $create_if_not_exists ) { # If GetUsers() is ok but empty then CreateUsers() diff --git a/onvif/modules/lib/ONVIF/Deserializer/MessageParser.pm b/onvif/modules/lib/ONVIF/Deserializer/MessageParser.pm index 8e3b8f025..40dacfec3 100644 --- a/onvif/modules/lib/ONVIF/Deserializer/MessageParser.pm +++ b/onvif/modules/lib/ONVIF/Deserializer/MessageParser.pm @@ -252,7 +252,7 @@ sub _initialize { # stop believing we're a leaf node $_leaf = 0; - # return if there's only one elment - can't set it in parent ;-) + # return if there's only one element - can't set it in parent ;-) # but set as root element if we don't have one already. if (not defined $list->[-1]) { $self->{ data } = $current if (not exists $self->{ data }); diff --git a/onvif/proxy/lib/ONVIF/Analytics/Types/EventSubscription.pm b/onvif/proxy/lib/ONVIF/Analytics/Types/EventSubscription.pm index 4b42f6ce1..8504bb6d7 100644 --- a/onvif/proxy/lib/ONVIF/Analytics/Types/EventSubscription.pm +++ b/onvif/proxy/lib/ONVIF/Analytics/Types/EventSubscription.pm @@ -111,7 +111,7 @@ ONVIF::Analytics::Types::EventSubscription Perl data type class for the XML Schema defined complexType EventSubscription from the namespace http://www.onvif.org/ver10/schema. -Subcription handling in the same way as base notification subscription. +Subscription handling in the same way as base notification subscription. diff --git a/onvif/proxy/lib/ONVIF/Analytics/Types/Layout.pm b/onvif/proxy/lib/ONVIF/Analytics/Types/Layout.pm index 053e408a9..f32e3ea56 100644 --- a/onvif/proxy/lib/ONVIF/Analytics/Types/Layout.pm +++ b/onvif/proxy/lib/ONVIF/Analytics/Types/Layout.pm @@ -67,7 +67,7 @@ ONVIF::Analytics::Types::Layout Perl data type class for the XML Schema defined complexType Layout from the namespace http://www.onvif.org/ver10/schema. -A layout describes a set of Video windows that are displayed simultaniously on a display. +A layout describes a set of Video windows that are displayed simultaneously on a display. diff --git a/onvif/proxy/lib/ONVIF/Analytics/Types/RecordingSourceInformation.pm b/onvif/proxy/lib/ONVIF/Analytics/Types/RecordingSourceInformation.pm index b68d50d33..1b987de40 100644 --- a/onvif/proxy/lib/ONVIF/Analytics/Types/RecordingSourceInformation.pm +++ b/onvif/proxy/lib/ONVIF/Analytics/Types/RecordingSourceInformation.pm @@ -82,7 +82,7 @@ ONVIF::Analytics::Types::RecordingSourceInformation Perl data type class for the XML Schema defined complexType RecordingSourceInformation from the namespace http://www.onvif.org/ver10/schema. -A set of informative desciptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. +A set of informative descriptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. diff --git a/onvif/proxy/lib/ONVIF/Analytics/Types/SystemDateTime.pm b/onvif/proxy/lib/ONVIF/Analytics/Types/SystemDateTime.pm index 12d9cef01..682e15999 100644 --- a/onvif/proxy/lib/ONVIF/Analytics/Types/SystemDateTime.pm +++ b/onvif/proxy/lib/ONVIF/Analytics/Types/SystemDateTime.pm @@ -87,7 +87,7 @@ ONVIF::Analytics::Types::SystemDateTime Perl data type class for the XML Schema defined complexType SystemDateTime from the namespace http://www.onvif.org/ver10/schema. -General date time inforamtion returned by the GetSystemDateTime method. +General date time information returned by the GetSystemDateTime method. diff --git a/onvif/proxy/lib/ONVIF/Device/Types/EventSubscription.pm b/onvif/proxy/lib/ONVIF/Device/Types/EventSubscription.pm index b28266254..751c96663 100644 --- a/onvif/proxy/lib/ONVIF/Device/Types/EventSubscription.pm +++ b/onvif/proxy/lib/ONVIF/Device/Types/EventSubscription.pm @@ -111,7 +111,7 @@ ONVIF::Device::Types::EventSubscription Perl data type class for the XML Schema defined complexType EventSubscription from the namespace http://www.onvif.org/ver10/schema. -Subcription handling in the same way as base notification subscription. +Subscription handling in the same way as base notification subscription. diff --git a/onvif/proxy/lib/ONVIF/Device/Types/Layout.pm b/onvif/proxy/lib/ONVIF/Device/Types/Layout.pm index 3a96243dc..86b5c38a4 100644 --- a/onvif/proxy/lib/ONVIF/Device/Types/Layout.pm +++ b/onvif/proxy/lib/ONVIF/Device/Types/Layout.pm @@ -67,7 +67,7 @@ ONVIF::Device::Types::Layout Perl data type class for the XML Schema defined complexType Layout from the namespace http://www.onvif.org/ver10/schema. -A layout describes a set of Video windows that are displayed simultaniously on a display. +A layout describes a set of Video windows that are displayed simultaneously on a display. diff --git a/onvif/proxy/lib/ONVIF/Device/Types/RecordingSourceInformation.pm b/onvif/proxy/lib/ONVIF/Device/Types/RecordingSourceInformation.pm index b41546cb5..e716c0019 100644 --- a/onvif/proxy/lib/ONVIF/Device/Types/RecordingSourceInformation.pm +++ b/onvif/proxy/lib/ONVIF/Device/Types/RecordingSourceInformation.pm @@ -82,7 +82,7 @@ ONVIF::Device::Types::RecordingSourceInformation Perl data type class for the XML Schema defined complexType RecordingSourceInformation from the namespace http://www.onvif.org/ver10/schema. -A set of informative desciptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. +A set of informative descriptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. diff --git a/onvif/proxy/lib/ONVIF/Device/Types/SystemDateTime.pm b/onvif/proxy/lib/ONVIF/Device/Types/SystemDateTime.pm index 4d1e63cb4..c8f9183fe 100644 --- a/onvif/proxy/lib/ONVIF/Device/Types/SystemDateTime.pm +++ b/onvif/proxy/lib/ONVIF/Device/Types/SystemDateTime.pm @@ -87,7 +87,7 @@ ONVIF::Device::Types::SystemDateTime Perl data type class for the XML Schema defined complexType SystemDateTime from the namespace http://www.onvif.org/ver10/schema. -General date time inforamtion returned by the GetSystemDateTime method. +General date time information returned by the GetSystemDateTime method. diff --git a/onvif/proxy/lib/ONVIF/Media/Types/EventSubscription.pm b/onvif/proxy/lib/ONVIF/Media/Types/EventSubscription.pm index 926fcdb55..bd5b5fa69 100644 --- a/onvif/proxy/lib/ONVIF/Media/Types/EventSubscription.pm +++ b/onvif/proxy/lib/ONVIF/Media/Types/EventSubscription.pm @@ -111,7 +111,7 @@ ONVIF::Media::Types::EventSubscription Perl data type class for the XML Schema defined complexType EventSubscription from the namespace http://www.onvif.org/ver10/schema. -Subcription handling in the same way as base notification subscription. +Subscription handling in the same way as base notification subscription. diff --git a/onvif/proxy/lib/ONVIF/Media/Types/Layout.pm b/onvif/proxy/lib/ONVIF/Media/Types/Layout.pm index 10cc72f6c..103e1a079 100644 --- a/onvif/proxy/lib/ONVIF/Media/Types/Layout.pm +++ b/onvif/proxy/lib/ONVIF/Media/Types/Layout.pm @@ -67,7 +67,7 @@ ONVIF::Media::Types::Layout Perl data type class for the XML Schema defined complexType Layout from the namespace http://www.onvif.org/ver10/schema. -A layout describes a set of Video windows that are displayed simultaniously on a display. +A layout describes a set of Video windows that are displayed simultaneously on a display. diff --git a/onvif/proxy/lib/ONVIF/Media/Types/RecordingSourceInformation.pm b/onvif/proxy/lib/ONVIF/Media/Types/RecordingSourceInformation.pm index 5ad0b48d7..06e547d30 100644 --- a/onvif/proxy/lib/ONVIF/Media/Types/RecordingSourceInformation.pm +++ b/onvif/proxy/lib/ONVIF/Media/Types/RecordingSourceInformation.pm @@ -82,7 +82,7 @@ ONVIF::Media::Types::RecordingSourceInformation Perl data type class for the XML Schema defined complexType RecordingSourceInformation from the namespace http://www.onvif.org/ver10/schema. -A set of informative desciptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. +A set of informative descriptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. diff --git a/onvif/proxy/lib/ONVIF/Media/Types/SystemDateTime.pm b/onvif/proxy/lib/ONVIF/Media/Types/SystemDateTime.pm index e28895743..55a997981 100644 --- a/onvif/proxy/lib/ONVIF/Media/Types/SystemDateTime.pm +++ b/onvif/proxy/lib/ONVIF/Media/Types/SystemDateTime.pm @@ -87,7 +87,7 @@ ONVIF::Media::Types::SystemDateTime Perl data type class for the XML Schema defined complexType SystemDateTime from the namespace http://www.onvif.org/ver10/schema. -General date time inforamtion returned by the GetSystemDateTime method. +General date time information returned by the GetSystemDateTime method. diff --git a/onvif/proxy/lib/ONVIF/PTZ/Types/EventSubscription.pm b/onvif/proxy/lib/ONVIF/PTZ/Types/EventSubscription.pm index 67e40e458..4d031695e 100644 --- a/onvif/proxy/lib/ONVIF/PTZ/Types/EventSubscription.pm +++ b/onvif/proxy/lib/ONVIF/PTZ/Types/EventSubscription.pm @@ -111,7 +111,7 @@ ONVIF::PTZ::Types::EventSubscription Perl data type class for the XML Schema defined complexType EventSubscription from the namespace http://www.onvif.org/ver10/schema. -Subcription handling in the same way as base notification subscription. +Subscription handling in the same way as base notification subscription. diff --git a/onvif/proxy/lib/ONVIF/PTZ/Types/Layout.pm b/onvif/proxy/lib/ONVIF/PTZ/Types/Layout.pm index 73536406e..24e3ff721 100644 --- a/onvif/proxy/lib/ONVIF/PTZ/Types/Layout.pm +++ b/onvif/proxy/lib/ONVIF/PTZ/Types/Layout.pm @@ -67,7 +67,7 @@ ONVIF::PTZ::Types::Layout Perl data type class for the XML Schema defined complexType Layout from the namespace http://www.onvif.org/ver10/schema. -A layout describes a set of Video windows that are displayed simultaniously on a display. +A layout describes a set of Video windows that are displayed simultaneously on a display. diff --git a/onvif/proxy/lib/ONVIF/PTZ/Types/RecordingSourceInformation.pm b/onvif/proxy/lib/ONVIF/PTZ/Types/RecordingSourceInformation.pm index ed35bd6ab..152e19f6d 100644 --- a/onvif/proxy/lib/ONVIF/PTZ/Types/RecordingSourceInformation.pm +++ b/onvif/proxy/lib/ONVIF/PTZ/Types/RecordingSourceInformation.pm @@ -82,7 +82,7 @@ ONVIF::PTZ::Types::RecordingSourceInformation Perl data type class for the XML Schema defined complexType RecordingSourceInformation from the namespace http://www.onvif.org/ver10/schema. -A set of informative desciptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. +A set of informative descriptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. diff --git a/onvif/proxy/lib/ONVIF/PTZ/Types/SystemDateTime.pm b/onvif/proxy/lib/ONVIF/PTZ/Types/SystemDateTime.pm index 870cc7624..1a3790350 100644 --- a/onvif/proxy/lib/ONVIF/PTZ/Types/SystemDateTime.pm +++ b/onvif/proxy/lib/ONVIF/PTZ/Types/SystemDateTime.pm @@ -87,7 +87,7 @@ ONVIF::PTZ::Types::SystemDateTime Perl data type class for the XML Schema defined complexType SystemDateTime from the namespace http://www.onvif.org/ver10/schema. -General date time inforamtion returned by the GetSystemDateTime method. +General date time information returned by the GetSystemDateTime method. diff --git a/onvif/wsdl/devicemgmt.wsdl b/onvif/wsdl/devicemgmt.wsdl index d7f7379c1..f99f78217 100644 --- a/onvif/wsdl/devicemgmt.wsdl +++ b/onvif/wsdl/devicemgmt.wsdl @@ -484,7 +484,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Contains the arbitary device diagnostics information. + Contains the arbitrary device diagnostics information. @@ -525,7 +525,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Contains a list of URI definining the device scopes. Scope parameters can be of two types: fixed and configurable. Fixed parameters can not be altered. + Contains a list of URI defining the device scopes. Scope parameters can be of two types: fixed and configurable. Fixed parameters can not be altered. @@ -2409,7 +2409,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - This operation gets arbitary device diagnostics information from the device. + This operation gets arbitrary device diagnostics information from the device. @@ -2582,7 +2582,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO This operation sets the hostname on a device. It shall be possible to set the device hostname configurations through the SetHostname command.
- A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to RFC 952, + A device shall accept string formatted according to RFC 1123 section 2.1 or alternatively to RFC 952, other string shall be considered as invalid strings.
@@ -2614,7 +2614,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO This operation sets the NTP settings on a device. If the device supports NTP, it shall be possible to set the NTP server settings through the SetNTP command.
- A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to RFC 952, + A device shall accept string formatted according to RFC 1123 section 2.1 or alternatively to RFC 952, other string shall be considered as invalid strings.
Changes to the NTP server list will not affect the clock mode DateTimeType. Use SetSystemDateAndTime to activate NTP operation.
@@ -2830,19 +2830,19 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO
This operation gets a list of all available relay outputs and their settings.
- This method has been depricated with version 2.0. Refer to the DeviceIO service.
+ This method has been deprecated with version 2.0. Refer to the DeviceIO service.
This operation sets the settings of a relay output. -
This method has been depricated with version 2.0. Refer to the DeviceIO service.
+
This method has been deprecated with version 2.0. Refer to the DeviceIO service.
This operation sets the state of a relay output. -
This method has been depricated with version 2.0. Refer to the DeviceIO service.
+
This method has been deprecated with version 2.0. Refer to the DeviceIO service.
diff --git a/onvif/wsdl/onvif-local.xsd b/onvif/wsdl/onvif-local.xsd index 17f722d6e..184327954 100644 --- a/onvif/wsdl/onvif-local.xsd +++ b/onvif/wsdl/onvif-local.xsd @@ -354,7 +354,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Token that uniquely refernces this configuration. Length up to 64 characters. + Token that uniquely references this configuration. Length up to 64 characters. @@ -700,7 +700,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. + Supported encoding interval range. The encoding interval corresponds to the number of frames divided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. @@ -741,7 +741,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. + Supported encoding interval range. The encoding interval corresponds to the number of frames divided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. @@ -787,7 +787,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Supported encoding interval range. The encoding interval corresponds to the number of frames devided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. + Supported encoding interval range. The encoding interval corresponds to the number of frames divided by the encoded frames. An encoding interval value of "1" means that all frames are encoded. @@ -1016,7 +1016,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - Subcription handling in the same way as base notification subscription. + Subscription handling in the same way as base notification subscription. - General date time inforamtion returned by the GetSystemDateTime method. + General date time information returned by the GetSystemDateTime method. - Indicates if the time is set manully or through NTP. + Indicates if the time is set manually or through NTP. @@ -3482,7 +3482,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - Confgiuration information for TLS Method. + Configuration information for TLS Method. @@ -4506,7 +4506,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - An option to indicate Home postion for tour spots. + An option to indicate Home position for tour spots. @@ -6482,7 +6482,7 @@ If set to 0.0, infinity will be used. The ParentTopic labels the message (e.g. "nn:RuleEngine/LineCrossing"). The real message can extend the ParentTopic by for example the name of the instaniated rule (e.g. "nn:RuleEngine/LineCrossing/corssMyFirstLine"). - Even without knowing the complete topic name, the subscriber will be able to distiguish the + Even without knowing the complete topic name, the subscriber will be able to distinguish the messages produced by different rule instances of the same type via the Source fields of the message. There the name of the rule instance, which produced the message, must be listed. @@ -6819,7 +6819,7 @@ and sample rate. - A layout describes a set of Video windows that are displayed simultaniously on a display. + A layout describes a set of Video windows that are displayed simultaneously on a display. @@ -6855,7 +6855,7 @@ and sample rate. - This section describes the supported video codesc and their configuration. + This section describes the supported video codecs and their configuration. @@ -7226,7 +7226,7 @@ and sample rate. - The time when the event occured. + The time when the event occurred. - Subcription handling in the same way as base notification subscription. + Subscription handling in the same way as base notification subscription. @@ -1047,7 +1047,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO - True if the device is able to stream zoom status inforamtion. + True if the device is able to stream zoom status information. @@ -1464,7 +1464,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - Read only property signalling that streaming is persistant. Use the methods StartMulticastStreaming and StopMulticastStreaming to switch its state. + Read only property signalling that streaming is persistent. Use the methods StartMulticastStreaming and StopMulticastStreaming to switch its state. @@ -1793,7 +1793,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - Indicates whether router advertisment is used. + Indicates whether router advertisement is used. @@ -1818,7 +1818,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - List of IPv6 addresses configured by using router advertisment. + List of IPv6 addresses configured by using router advertisement. @@ -2172,7 +2172,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - Indicates whether router advertisment is used. + Indicates whether router advertisement is used. @@ -3173,12 +3173,12 @@ decoding .A decoder shall decode every data it receives (according to its capabi - General date time inforamtion returned by the GetSystemDateTime method. + General date time information returned by the GetSystemDateTime method. - Indicates if the time is set manully or through NTP. + Indicates if the time is set manually or through NTP. @@ -3473,7 +3473,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - Confgiuration information for TLS Method. + Configuration information for TLS Method. @@ -4497,7 +4497,7 @@ decoding .A decoder shall decode every data it receives (according to its capabi - An option to indicate Home postion for tour spots. + An option to indicate Home position for tour spots. @@ -6473,7 +6473,7 @@ If set to 0.0, infinity will be used. The ParentTopic labels the message (e.g. "nn:RuleEngine/LineCrossing"). The real message can extend the ParentTopic by for example the name of the instaniated rule (e.g. "nn:RuleEngine/LineCrossing/corssMyFirstLine"). - Even without knowing the complete topic name, the subscriber will be able to distiguish the + Even without knowing the complete topic name, the subscriber will be able to distinguish the messages produced by different rule instances of the same type via the Source fields of the message. There the name of the rule instance, which produced the message, must be listed. @@ -6805,7 +6805,7 @@ and sample rate. - A layout describes a set of Video windows that are displayed simultaniously on a display. + A layout describes a set of Video windows that are displayed simultaneously on a display. @@ -6841,7 +6841,7 @@ and sample rate. - This section describes the supported video codesc and their configuration. + This section describes the supported video codecs and their configuration. @@ -7210,7 +7210,7 @@ and sample rate. - The time when the event occured. + The time when the event occurred. @@ -7365,7 +7365,7 @@ and sample rate. - A set of informative desciptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. + A set of informative descriptions of a data source. The Search searvice allows a client to filter on recordings based on information in this structure. @@ -8379,7 +8379,7 @@ and sample rate. - Range of the transparent level. Larger means more tranparent. + Range of the transparent level. Larger means more transparent. @@ -8442,7 +8442,7 @@ and sample rate. - List of avaiable uris of image. + List of available uris of image. diff --git a/onvif/wsdl/ptz.wsdl b/onvif/wsdl/ptz.wsdl index e977619be..90d3392d7 100644 --- a/onvif/wsdl/ptz.wsdl +++ b/onvif/wsdl/ptz.wsdl @@ -933,7 +933,7 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO the selected profile. The operation is supported if the PresetPosition - capability exists for teh Node in the + capability exists for the Node in the selected profile. From 87f09d3b7e3ccd910437632e2efafcd7a84cd0b0 Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 13 Aug 2023 17:56:55 -0700 Subject: [PATCH 7/7] Fix usage of unset variable If daemon or args are unset the preg_replace is never called which can result in count not having a value when referenced in the if statement. This generates a warning in error.log. --- web/api/app/Controller/HostController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/api/app/Controller/HostController.php b/web/api/app/Controller/HostController.php index 24e551aa3..563dd50c9 100644 --- a/web/api/app/Controller/HostController.php +++ b/web/api/app/Controller/HostController.php @@ -7,6 +7,7 @@ class HostController extends AppController { public function daemonCheck($daemon=false, $args=false) { # To try to prevent abuse here, we are only going to allow certain characters in the daemon and args. + $count = 0; $safe_daemon = $daemon ? preg_replace('/[^A-Za-z0-9\- \.]/', '', $daemon, -1, $count) : false; if ($count) Error("Invalid characters found in daemon string ($daemon). Potential attack?"); $safe_args = $args ? preg_replace('/[^A-Za-z0-9\- \.]/', '', $args, -1, $count) : false;