Commit Graph

215 Commits

Author SHA1 Message Date
IgorA100
b07d86fe90 Merge branch 'ZoneMinder:master' into patch-862983 2026-01-09 14:28:39 +03:00
Isaac Connor
8e71110305 Merge pull request #4513 from ZoneMinder/copilot/fix-event-redirect-after-login
Fix login redirect by passing postLoginQuery as URL parameter
2026-01-07 13:33:58 -05:00
Isaac Connor
80fc7a2c6a Fix logging statement 2026-01-04 18:27:31 -05:00
copilot-swe-agent[bot]
5a70180140 Fix login redirect to preserve original event URL
- Modified web/index.php to pass postLoginQuery as URL parameter during redirect
- Updated web/skins/classic/views/login.php to check both $_REQUEST and $_SESSION for postLoginQuery
- This fixes the timing issue where session variable may not be available when login form renders

Co-authored-by: SteveGilvarry <7613276+SteveGilvarry@users.noreply.github.com>
2026-01-02 02:01:35 +00:00
IgorA100
4c98fcf47e Added a new constant DIR_EXPORTS_DOWNLOAD (index.php)
Because a separate directory is easier to monitor for generated files for download. This is planned for implementation in future PRs.
2025-12-18 00:44:23 +03:00
Isaac Connor
df5eb15c76 Fix warning 2025-07-10 12:16:32 -04:00
Isaac Connor
7c81957aa2 Extend session around the setting of css, skin and navbar_type. Default navbar_type to what is in session 2025-07-05 12:02:43 -04:00
Isaac Connor
225b428592 Rework left vs top as NAVBAR_TYPE 2025-07-05 11:46:06 -04:00
Isaac Connor
55b99e19ab Use a redirect on homeview to fix having query params added on 2024-12-13 12:19:30 -05:00
Isaac Connor
65e098c35b If no view, default to home view 2024-11-23 13:36:59 -05:00
Isaac Connor
1884b18611 Don't run actions if we intend to redirect 2024-11-22 16:29:35 -05:00
Isaac Connor
0ac7434590 Further deprecate ZM_BASE_URL. Ssee #3761 2024-09-13 09:54:41 -04:00
Isaac Connor
663665ccfa Add possible config override of skin and css, forcing their use 2024-05-30 13:44:29 -04:00
Isaac Connor
2a06e0faf2 Make view does not exist an error instead of fatal 2024-05-08 14:28:40 -04:00
Isaac Connor
4df4f5146a Log error_message if set 2024-01-21 11:31:06 -05:00
Isaac Connor
72e8ee0e5e Move session inclusion down to where it is first used. 2023-12-29 11:06:46 -05:00
Isaac Connor
326a4ca201 Clean out old unused debugging code. The code further down is more useful 2023-12-29 11:06:46 -05:00
Isaac Connor
ccfcd33855 modal requests require csrf-magic. 2023-12-05 09:47:35 -05:00
Isaac Connor
02f922d4b7 Don't include csrf on ajax requests. We only return json for ajax and the csrf kills the json parsing. 2023-11-28 10:16:58 -05:00
Isaac Connor
6a68e5577a If view does not exist, redirect to console instead of just dying 2023-11-09 09:57:27 -05:00
Isaac Connor
969baa3891 Convert user from an array to a User object 2023-04-23 12:57:29 -04:00
Isaac Connor
764d48d378 If the css in cookie is invalid, clear it so that the logs don't fill up with the warnings 2023-03-22 08:06:02 -04:00
Isaac Connor
80797e97d7 Move actions process to after the unauth check. In the past the action did the logging in but that is no longer the case. We can now assume in actions that the user is at least logged in. 2023-02-20 10:16:44 -05:00
Isaac Connor
0c316662e0 Remove php4 support 2023-01-03 15:50:18 -05:00
Isaac Connor
8c35190b0a Move loading of global Servers array into config.php. 2023-01-03 13:16:03 -05:00
Isaac Connor
f9a3c5fc83 Don't log error when ignoring action if it is an ajax request 2022-11-16 09:28:33 -05:00
Isaac Connor
89c6e22052 Remove check for ZM_WEB_DIR is writable. 2022-11-15 14:44:45 -05:00
Isaac Connor
6199613c40 Merge branch 'add_event_data' 2022-10-31 18:00:32 -04:00
Isaac Connor
6edbee7c70 Handle empty but defined REQUEST[action] 2022-10-31 17:59:34 -04:00
Isaac Connor
91e728c0d3 Sort servers in global array 2022-10-25 13:31:40 -04:00
Isaac Connor
ce62bb1297 Minor cleanup, remove dead code 2022-10-17 17:25:36 -04:00
Isaac Connor
c0a4c05e84 Only perform actions on post. Doing them on GET allows doing actions from things like img tags which is not good. 2022-10-03 15:49:48 -04:00
Isaac Connor
c7ded07794 Only look for action if there is a view 2022-09-27 10:49:50 -04:00
Isaac Connor
7874825064 put back including config.php 2022-06-03 10:09:36 -04:00
Isaac Connor
4a6ad1f880 move dateFormatters to config. This is so that they get setup even if not using index.php. Like cakephp for example. 2022-06-02 20:13:37 -04:00
Isaac Connor
efe2f0b0a1 Add overriding timeFormatter pattern 2022-06-01 16:20:36 -04:00
Isaac Connor
655daff383 Add timeFormatter 2022-06-01 16:16:38 -04:00
Isaac Connor
ce6bb6140a Setup global dateFormatter and dateTimeFormatter. Once config is initialized, redo them if a different local was specified, and then apply custom patters if specified. 2022-06-01 15:49:50 -04:00
Isaac Connor
8f05b4788f Add default global dateFormatter. Default to en_US but after config is loaded we can replace it. 2022-06-01 13:33:41 -04:00
Isaac Connor
efc1ec770c Debug the contents of REQUEST on every hit. 2022-02-15 18:52:46 -05:00
Isaac Connor
db866fa668 Implement zm_setcookie to simplify setting cookies, set samesite, deal with older php etc. Use it. 2022-01-20 09:46:38 -05:00
Isaac Connor
ba9a871daf Move CSP stuff down to view parsing. ajax requests only output json, so CSP shouldn't be relevant. Only end output buffer if there is one. archive view for example clears all output buffers. 2021-08-18 10:53:59 -04:00
Isaac Connor
ed5262432f Fix samsite support for php <= 7.2 2021-06-02 14:59:13 -04:00
Isaac Connor
9e64b912a8 Add samesite when setting cookie for skin and css 2021-05-25 11:33:28 -04:00
Isaac Connor
7aa625ea8e Don't both loading all the Object code until after auth. 2021-04-12 15:59:31 -04:00
Isaac Connor
284837d536 quotes, spaces. Also move setting redirect to to where we actually do the redirect so that actions can remove the redirect if there was an error to report. 2021-03-21 09:19:21 -04:00
Isaac Connor
0bb4afa0bc The test for xmlhttprequest is bogus. chrome jquery JSON requests don't send it. Replace with a test for instead. So now only redirect on proper html views. 2021-03-13 12:11:55 -05:00
Isaac Connor
c6cf1da47d Merge branch 'master' into zma_to_thread 2021-01-11 17:08:44 -05:00
Isaac Connor
10c0a6617c Return Debug to a regular function to match other logging functions. Since we switched to using namespaces we no longer clash with cake_php. 2020-10-14 10:39:25 -04:00
Andrew Bauer
0f263407a5 make redirect conditional on previous view 2020-10-12 10:32:25 -05:00