Merge branch 'master' of github.com:ZoneMinder/zoneminder

This commit is contained in:
Isaac Connor 2021-08-29 09:17:36 -04:00
commit 048b8b13a3
6 changed files with 23 additions and 17 deletions

View File

@ -2,7 +2,7 @@ Source: zoneminder
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Isaac Connor <isaac@zoneminder.com> Maintainer: Isaac Connor <isaac@zoneminder.com>
Build-Depends: debhelper (>= 11), sphinx-doc, python3-sphinx, dh-linktree, dh-apache2 Build-Depends: debhelper (>= 10), sphinx-doc, python3-sphinx, dh-linktree, dh-apache2
,cmake ,cmake
,libavcodec-dev ,libavcodec-dev
,libavformat-dev ,libavformat-dev

View File

@ -5,10 +5,7 @@ This screen lets you customize several aspects of the web interface of ZoneMinde
.. image:: images/Options_web.png .. image:: images/Options_web.png
WEB_TITLE - WEB_TITLE - The actual text that is shown on the login screen. It is possible that it also appears in other areas.
.. todo ::
not quite sure what this does. Seems to change the "target" name - not sure what effect it is supposed to have.
WEB_TITLE_PREFIX - If you have more than one installation of ZoneMinder it can be helpful to display different titles for each one. Changing this option allows you to customise the window titles to include further information to aid identification. WEB_TITLE_PREFIX - If you have more than one installation of ZoneMinder it can be helpful to display different titles for each one. Changing this option allows you to customise the window titles to include further information to aid identification.
@ -48,4 +45,4 @@ WEB_USE_OBJECT_TAGS - There are two methods of including media content in web pa
WEB_XFRAME_WARN - When creating a Web Site monitor, if the target web site has X-Frame-Options set to sameorigin in the header, the site will not display in ZoneMinder. This is a design feature in most modern browsers. When this condition occurs, ZoneMinder will write a warning to the log file. To get around this, one can install a browser plugin or extension to ignore X-Frame headers, and then the page will display properly. Once the plugin or extension has ben installed, the end user may choose to turn this warning off WEB_XFRAME_WARN - When creating a Web Site monitor, if the target web site has X-Frame-Options set to sameorigin in the header, the site will not display in ZoneMinder. This is a design feature in most modern browsers. When this condition occurs, ZoneMinder will write a warning to the log file. To get around this, one can install a browser plugin or extension to ignore X-Frame headers, and then the page will display properly. Once the plugin or extension has ben installed, the end user may choose to turn this warning off
WEB_FILTER_SOURCE - This option only affects monitors with a source type of Ffmpeg, Libvlc, or WebSite. This setting controls what information is displayed in the Source column on the console. Selecting 'None' will not filter anything. The entire source string will be displayed, which may contain sensitive information. Selecting 'NoCredentials' will strip out usernames and passwords from the string. If there are any port numbers in the string and they are common (80, 554, etc) then those will be removed as well. Selecting 'Hostname' will filter out all information except for the hostname or ip address. When in doubt, stay with the default 'Hostname'. This feature uses the php function 'url_parts' to identify the various pieces of the url. If the url in question is unusual or not standard in some way, then filtering may not produce the desired results. WEB_FILTER_SOURCE - This option only affects monitors with a source type of Ffmpeg, Libvlc, or WebSite. This setting controls what information is displayed in the Source column on the console. Selecting 'None' will not filter anything. The entire source string will be displayed, which may contain sensitive information. Selecting 'NoCredentials' will strip out usernames and passwords from the string. If there are any port numbers in the string and they are common (80, 554, etc) then those will be removed as well. Selecting 'Hostname' will filter out all information except for the hostname or ip address. When in doubt, stay with the default 'Hostname'. This feature uses the php function 'url_parts' to identify the various pieces of the url. If the url in question is unusual or not standard in some way, then filtering may not produce the desired results.

View File

@ -100,7 +100,8 @@ void RemoteCamera::Initialise() {
int ret = getaddrinfo(host.c_str(), port.c_str(), &hints, &hp); int ret = getaddrinfo(host.c_str(), port.c_str(), &hints, &hp);
if ( ret != 0 ) { if ( ret != 0 ) {
Fatal( "Can't getaddrinfo(%s port %s): %s", host.c_str(), port.c_str(), gai_strerror(ret) ); Error( "Can't getaddrinfo(%s port %s): %s", host.c_str(), port.c_str(), gai_strerror(ret) );
return;
} }
struct addrinfo *p = nullptr; struct addrinfo *p = nullptr;
int addr_count = 0; int addr_count = 0;

View File

@ -144,6 +144,14 @@ void RemoteCameraHttp::Initialise() {
int RemoteCameraHttp::Connect() { int RemoteCameraHttp::Connect() {
struct addrinfo *p = nullptr; struct addrinfo *p = nullptr;
if (!hp) {
RemoteCamera::Initialise();
if (!hp) {
Error("Unable to resolve address for remote camera, aborting");
return -1;
}
}
for ( p = hp; p != nullptr; p = p->ai_next ) { for ( p = hp; p != nullptr; p = p->ai_next ) {
sd = socket( p->ai_family, p->ai_socktype, p->ai_protocol ); sd = socket( p->ai_family, p->ai_socktype, p->ai_protocol );
if ( sd < 0 ) { if ( sd < 0 ) {

View File

@ -266,7 +266,7 @@ class MonitorsController extends AppController {
if ($mToken) { if ($mToken) {
$auth = ' -T '.$mToken; $auth = ' -T '.$mToken;
} else if (ZM_AUTH_RELAY == 'hashed') { } else if (ZM_AUTH_RELAY == 'hashed') {
$auth = ' -A '.calculateAuthHash(ZM_AUTH_HASH_IPS?$_SERVER['REMOTE_ADDR']:''); $auth = ' -A '.calculateAuthHash(''); # Can't do REMOTE_IP because zmu doesn't normally have access to it.
} else if (ZM_AUTH_RELAY == 'plain') { } else if (ZM_AUTH_RELAY == 'plain') {
# Plain requires the plain text password which must either be in request or stored in session # Plain requires the plain text password which must either be in request or stored in session
$password = $this->request->query('pass') ? $this->request->query('pass') : $this->request->data('pass');; $password = $this->request->query('pass') ? $this->request->query('pass') : $this->request->data('pass');;

View File

@ -73,10 +73,10 @@ function processRows(rows) {
function showEvents() { function showEvents() {
$j('#ptzControls').addClass('hidden'); $j('#ptzControls').addClass('hidden');
$j('#events').removeClass('hidden'); $j('#events').removeClass('hidden');
if ( $j('#eventsControl') ) { if ($j('#eventsControl')) {
$j('#eventsControl').addClass('hidden'); $j('#eventsControl').addClass('hidden');
} }
if ( $j('#controlControl') ) { if ($j('#controlControl')) {
$j('#controlControl').removeClass('hidden'); $j('#controlControl').removeClass('hidden');
} }
showMode = 'events'; showMode = 'events';
@ -85,10 +85,10 @@ function showEvents() {
function showPtzControls() { function showPtzControls() {
$j('#events').addClass('hidden'); $j('#events').addClass('hidden');
$j('#ptzControls').removeClass('hidden'); $j('#ptzControls').removeClass('hidden');
if ( $j('#eventsControl') ) { if ($j('#eventsControl')) {
$j('#eventsControl').removeClass('hidden'); $j('#eventsControl').removeClass('hidden');
} }
if ( $j('#controlControl') ) { if ($j('#controlControl')) {
$j('#controlControl').addClass('hidden'); $j('#controlControl').addClass('hidden');
} }
showMode = 'control'; showMode = 'control';
@ -132,13 +132,13 @@ function setAlarmState(currentAlarmState) {
alarmState = currentAlarmState; alarmState = currentAlarmState;
var stateClass = ''; var stateClass = '';
if ( alarmState == STATE_ALARM ) { if (alarmState == STATE_ALARM) {
stateClass = 'alarm'; stateClass = 'alarm';
} else if ( alarmState == STATE_ALERT ) { } else if (alarmState == STATE_ALERT) {
stateClass = 'alert'; stateClass = 'alert';
} }
$j('#stateValue').text(stateStrings[alarmState]); $j('#stateValue').text(stateStrings[alarmState]);
if ( stateClass ) { if (stateClass) {
$j('#stateValue').addClass(stateClass); $j('#stateValue').addClass(stateClass);
} else { } else {
$j('#stateValue').removeClass(); $j('#stateValue').removeClass();
@ -855,10 +855,10 @@ function initPage() {
if (monitorType != 'WebSite') { if (monitorType != 'WebSite') {
if (streamMode == 'single') { if (streamMode == 'single') {
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout ); statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'status'); setInterval(watchdogCheck, statusRefreshTimeout*2, 'status');
} else { } else {
streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout ); streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream'); setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream');
} }