Isaac Connor
ba21820fd0
fix typo
2019-01-16 12:10:34 -05:00
Isaac Connor
eee1d871e0
get rid of default value for PathToIndex so that it will use PHP_SELF instead
2019-01-16 12:09:26 -05:00
Matt N
d33fec9c3f
Add a CSP script-src policy with nonce-source and convert more inline event handlers ( #2413 )
...
* Add Content-Security-Policy-Report-Only: script-src 'self' 'nonce-' policy
* Use @data-on-click-this to attach inline click event handlers which expect being called with 'this'
Only handle ones that don't return a value.
* Use @data-on-click to attach inline click event handlers with no args and no return value
* Use @data-on-click-true to attach inline click event handlers with 'true' as the only argument
* Enforce a script-src CSP on views without inline JS
* Convert some onchange attributes to data-on-change
2019-01-16 09:59:58 -05:00
Isaac Connor
fd696bc066
Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
2019-01-15 11:38:56 -05:00
Isaac Connor
3182d8bab7
implement to_json method so that defaults get included
2019-01-15 11:36:56 -05:00
Andrew Bauer
07d8ac1d49
implement timezone check function ( #2387 )
...
* implement timezone check function
* remove comment
* also check if the timezone is valid
* whitespace
2019-01-15 09:05:11 -05:00
Matt N
083f284599
Replace onclick inline event handlers for createPopup ( #2410 )
...
* Move <script> before </body>
* Change makePopupLink to not use onclick
* Change makePopupButton to not use onclick
* Use .popup-link in control_functions.php
* Use makePopupButton in controlcaps.php
* Prevent double-encoding in makePopup*
* Use makePopupButton in devices.php
* Use makePopupButton in logout.php
* Use makePopupLink in monitor.php
* Use makePopupLink and .popup-link in montage.php
* Use makePopupButton in options.php
* Use makePopupButton, makePopupLink, and .popup-link in zones.php
2019-01-15 09:01:58 -05:00
Isaac Connor
c834fbe462
the filter action should singular filter, not filters
2019-01-13 14:52:39 -05:00
Isaac Connor
b373577589
fix function view after actions cleanup
2019-01-10 12:08:25 -05:00
Isaac Connor
b4f8500cb5
Merge branch 'split_actions'
2019-01-05 18:33:04 -05:00
Isaac Connor
3f10553464
Fix include path to Monitors.php
2019-01-05 18:32:53 -05:00
Isaac Connor
e34a5e972a
fix missing }
2019-01-05 11:12:26 -05:00
Isaac Connor
5b5905c83a
We always use markEids[] now
2019-01-04 16:29:16 -05:00
Isaac Connor
0e20666992
fix eventdetail actions being in events
2019-01-04 15:43:31 -05:00
Isaac Connor
e2f32ab091
Upgrade config saving
2019-01-04 09:43:36 -05:00
Isaac Connor
7ec96655c3
fix missing ! when testing for permission on editing config
2019-01-04 09:37:26 -05:00
Isaac Connor
5b9bf48945
Merge branch 'master' into split_actions
2019-01-04 09:35:54 -05:00
Isaac Connor
46adcbb66b
Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
2019-01-04 09:34:51 -05:00
Isaac Connor
edeaa07c12
Fix no quotes around Id
2019-01-04 09:34:42 -05:00
Isaac Connor
6cad852e11
fix path to MontageLayout
2019-01-04 09:34:18 -05:00
Isaac Connor
dbe9817bc8
Split actions.php into individual files per view
2019-01-04 09:26:34 -05:00
Isaac Connor
874930d8fc
Merge branch 'master' into improve_config_efficiency
2019-01-02 13:07:53 -05:00
Andrew Bauer
d14e9ecf74
force overloadframes and ExtendAlarmFrames to int ( #2373 )
2018-12-29 09:53:31 -05:00
Andrew Bauer
a029909972
fix path to thumb and anal images ( #2367 )
2018-12-28 10:46:13 -05:00
Andrew Bauer
fb37fc48e1
update viewImagePatch ( #2370 )
2018-12-28 10:38:39 -05:00
Andrew Bauer
5f9a113da1
redirect to montage rather than montagereview
2018-12-26 10:34:01 -06:00
Isaac Connor
e0cae5709f
Group::find is now more powerful so we can just use it to return all Groups to be deleted
2018-12-24 09:39:40 -05:00
Isaac Connor
63199289ad
Change depth function to be 0-based.
2018-12-24 09:38:55 -05:00
Isaac Connor
a277f697e9
whitespace
2018-12-20 14:58:38 -05:00
Mike Rosack
567b60ffa7
support for forwarded proto/port in Server.php ( #2343 )
2018-12-13 10:24:32 -05:00
Andrew Bauer
8d74354fcb
Merge pull request #2242 from connortechnology/cleanup_auth
...
Cleanup auth
2018-12-12 20:53:24 -06:00
Isaac Connor
eba8b3327d
Merge branch 'master' into cleanup_auth
2018-12-11 16:04:42 -05:00
Andrew Bauer
4d7e98475f
Merge pull request #2297 from connortechnology/introduce_getBodyTopHTML
...
Introduce get body top html
2018-12-11 09:35:54 -06:00
Isaac Connor
e1ecd47bff
Fix missing use of UrlToApi
2018-12-11 09:40:40 -05:00
Isaac Connor
a1141d2dc4
remove second use of HTTP_HOST and use a better method of stripping off port from HTTP_HOST
2018-12-07 08:39:23 -05:00
Isaac Connor
757e538550
strip port from HTTP_HOST
2018-12-06 17:12:03 -05:00
Andrew Bauer
e327ad100e
fix WebSite camera startup issue
2018-12-01 17:03:50 -06:00
Andrew Bauer
cae6ffd5a3
use HTTP_HOST instead of SERVER_NAME
2018-12-01 13:27:08 -06:00
Isaac Connor
8c626c984b
Need to pass port through all Url functions
2018-11-30 14:45:58 -05:00
Isaac Connor
3bd5774ea1
Default to PathToIndex should have the index.php in it
2018-11-29 15:53:19 -05:00
Isaac Connor
1c17f334d3
fix missing bits. Implement UrlToIndex in Monitor and fix use of Url(). Implement PathToApi as well
2018-11-29 14:26:30 -05:00
Isaac Connor
1e915e9567
Merge branch 'master' into server_path_prefix
2018-11-28 10:45:36 -05:00
Isaac Connor
f8b2ff5c77
rework from Url() to PathToIndex(), PathToZMS(), UrlToIndex() and UrlToZMS()
2018-11-27 17:35:25 -05:00
Isaac Connor
17c1933913
remove an extra l
2018-11-26 16:20:15 -05:00
Isaac Connor
c5f7fb7b18
Merge branch 'master' into server_path_prefix
2018-11-22 10:04:33 -05:00
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
702143e51b
Create a function called getBodyTopHTML that outputs the body tag and anything else that should go at the top.
...
Things like the we require javascript message, and any other messages like error messages.
Use this on the monitor and console view to stick an error message at the top when saving a monitor fails.
This is a pretty quick, crude implementation.
2018-11-07 12:33:54 -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
e30b100e8e
Don't load & process categories in initial config loading
2018-10-19 15:00:30 -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
cbc26e0cec
cleanup trailing whitespace
2018-10-09 10:07:40 -04:00
Isaac Connor
a3d0cb42ea
Move GOOGLE RECAPCHA to includes/auth.php, clean login actions.
2018-10-09 10:05:50 -04:00
Isaac Connor
918d5fd469
move utility functions for doing get/post requests into functions.php from actions.php
2018-10-09 09:39:04 -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
6e5472d305
Merge branch 'master' into server_path_prefix
2018-08-22 12:57:16 -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