Commit Graph

811 Commits

Author SHA1 Message Date
Isaac Connor 415d43fafb Include Server Name when testing for CORS. Also be case insensitive. 2018-11-15 12:23:52 -05:00
Isaac Connor ec09a71ba0 Include defaults for all the missing Monitor Columns 2018-11-07 13:18:53 -05:00
Isaac Connor a066968aca fix dbError and cause it to return the error string instead of just logging it. Add error logging of db errors that don't throw exceptions. 2018-11-07 12:33:18 -05:00
Isaac Connor bdb50567df fix disk_event_space to event_disk_space 2018-10-31 11:56:08 -04:00
Isaac Connor 6691b5fb52 Include CORS headers when there is a Server defined, instead of requiring there to be more than 1 2018-10-29 12:50:50 -04:00
Isaac Connor 95a6d0666a Improve behaviour and reduce extra logging when db goes away 2018-10-29 09:59:26 -04:00
Isaac Connor 91d83a89fa include semaphore function replacements 2018-10-25 15:40:12 -04:00
Isaac Connor 115141bf9f add caching to Group::find 2018-10-24 10:02:42 -04:00
Isaac Connor 17a5519dd6
Include the remoteAddr in the session authhash cache, so that a change of ip won't allow the same useless auth hash. (#2264) 2018-10-19 13:39:37 -04:00
Isaac Connor f9b1453705 Include SERVER_PORT when not doing multi-server or multi-port but are running on a port other than 80. 2018-10-19 10:59:16 -04:00
Isaac Connor 37065d15ac fix url to api in monitor restart. 2018-10-16 09:47:24 -04:00
Isaac Connor f2b38f175d Update Frame::find_one so that we can specify an ordering for find_one and so that semantics match other objects find methods 2018-10-11 09:14:40 -04:00
Isaac Connor c4c8a728f2 Handle no controls found more gracefully 2018-10-10 19:04:00 -04:00
Isaac Connor 6ed146b4dd Use Hostname instead of Url in test for CORS access. 2018-10-10 14:01:36 -04:00
Isaac Connor 52b1439d51 fix the lack of /zm/index.php in url in Server->Url() and multiport 2018-10-08 09:55:47 -04:00
Isaac Connor 1eb8e9ed9e Include PHP_SELF in url to Server. This will assume that all servers in a multi-server setup use the same path 2018-10-08 09:45:03 -04:00
Isaac Connor 999e4c6c43 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-09-20 13:37:46 -04:00
Isaac Connor 90d1d79e9a Add missing AutoUpload field to Filter 2018-09-20 13:37:36 -04:00
Isaac Connor ba4878d2b5 fix use of instead of ['limit'] 2018-09-20 10:11:55 -04:00
Isaac Connor 503b40cb62 Need to cache the object not the row 2018-09-20 10:07:15 -04:00
Isaac Connor c6e953c4a9 if Monitor is not found, return empty Monitor instead of null 2018-09-20 09:02:20 -04:00
Isaac Connor c4108a2610 Fix missing quotes inc Event::Monitor 2018-09-20 08:59:15 -04:00
Isaac Connor 7f98277571 Merge updated Monitor.php that does caching 2018-09-15 09:52:08 -04:00
Isaac Connor b0c555599c Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209 2018-09-15 09:42:59 -04:00
Isaac Connor fa55cec12c fix error when scale is auto 2018-09-14 16:57:28 -04:00
Isaac Connor f1442eba90 once we have found a match for our origin, break out of loop 2018-09-14 14:56:26 -04:00
Isaac Connor d9b1d3ec11 fix CORS Headers when we are coming from a non-standard port. Use a regexp instead of == so that we match regardless of port 2018-09-14 14:52:33 -04:00
Isaac Connor b5b71edbf6 Make a Url function in the Monitor object to use the Server->Url + Port. Default to port used in current url. Fixes problems with using something other than port 80 2018-09-14 14:26:45 -04:00
Isaac Connor 55dcb161ae find should always return an array 2018-09-09 13:59:10 -04:00
Isaac Connor b4f80fbe11 Always return an array from find 2018-09-09 13:56:29 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor 7ee80e7cca Debug lines should be debug, not warning 2018-08-31 11:58:03 -04:00
Isaac Connor 4b30ea7877 cleanup, whitespace 2018-08-31 10:35:23 -04:00
Andrew Bauer 8f0fb0843a Add Privacy Statement (#2194)
* initial implementation of privacy popup

* split the privacy text and run it through translate

* change style of toggle button, validate the form

* fix copy/paste error

* fix typos

* display privacy view inline rather than popup

* display privacy inline if show_privacy flag set

* redirect to console after selection is made

* typo

* css formatting

* update privacy verbiage

* create and load default.php

* fix typos

* fix erroneous copy/paste
2018-08-30 13:25:02 -04:00
Isaac Connor 21d193294f Log errors shouldn't be fatal 2018-08-22 17:22:40 -04:00
Isaac Connor 15a6eb7e78
Revert "Add Privacy Statement (#2176)" (#2179)
This reverts commit 56f4d768c2.
2018-08-13 15:33:43 -04:00
Andrew Bauer 56f4d768c2 Add Privacy Statement (#2176)
* initial implementation of privacy popup

* split the privacy text and run it through translate

* change style of toggle button, validate the form

* fix copy/paste error

* fix typos

* display privacy view inline rather than popup

* display privacy inline if show_privacy flag set

* redirect to console after selection is made

* typo

* css formatting

* update privacy verbiage

* push privacy text to all language files
2018-08-13 15:23:44 -04:00
Andrew Bauer 3dc424282b Support quoting config variables (#2175)
* allow handling of quotes in config files

* copy paste error

* surround zm_arptool in quotes
2018-08-11 12:56:16 -04:00
Isaac Connor b72d520e02 implement the ability to pass a disabled option to htmlSelect. Use it to disable the h264 passthrough option for non-ffmpeg monitors. Instead of disappearing it. 2018-08-03 10:02:42 -04:00
Isaac Connor 886391a547 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-07-31 10:16:05 -04:00
Isaac Connor 363e1dda97 Add some more Monitor defaults, mainly Refresh which gets called in watch.js.php 2018-07-31 10:15:26 -04:00
Roman Dissertori 48b91c5544 Bugfix in Control and added new Camera (#2171)
* fixed control typos

missing word "s" for "Controls" Table for database queries

* added Dericam P2 camera Control

* fixed missing CanReset column

* Update DericamP2.pm

* added some more missing controls

CanSleep, CanWake

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update zm_create.sql.in
2018-07-28 09:26:02 -04:00
Pliable Pixels 0ff9002adf 2156 api login (#2157)
* error can be due to bad user or password

* added login/logout and related private functions

* handle case when userLogin fails, current code returns PHP error for  and API throw is not called

* formatting

* converted login params to POST, removed user=&pass= for other APIs

* formatting

* add auth check back but leave out login/out

* fixes to make it work across zmN, postman and curl

* added back enabled check
2018-07-15 21:17:35 -04:00
Isaac Connor 4aa289cd66 fix reCaptcha failure still allowing login 2018-07-12 11:44:20 -04:00
Isaac Connor 0acad44b4a test for existence of Storage path before trying things like disk_total_space which will fill the html output with php errors. 2018-07-11 17:21:44 -04:00
Isaac Connor 05615c5cf4 We should not use a hard path in cache bust 2018-07-11 15:48:01 -04:00
Isaac Connor b8691e4654 Don't need global cookies. Only open session if needed in userLogin 2018-07-11 11:45:19 -04:00
Isaac Connor c6ded845d0 Return the user db row ifrom userLogin instead of assuming it will be accessed as a global. Add is_session_started function and use it to detect when we need to start/stop the session in generateAuthHash 2018-07-11 10:34:45 -04:00
Isaac Connor 3ecf0055b5 spacing 2018-07-09 13:07:16 -04:00
Isaac Connor cf4a1c73fd Always us /zm in cache_bust 2018-07-04 14:46:22 -04:00