Commit Graph
246 Commits
Author SHA1 Message Date
Petr MacekandTheWitness 7b8726cf1d fix few login issues (missing/wrong messages) (#4703)
* fix few login issues (missing/wrong messages)

* Minor update

* Minor edits

* Update auth.php

Co-authored-by: TheWitness <thewitness@cacti.net>
2022-04-12 18:29:55 -04:00
TheWitness 5619a17fb9 Fixing Issue #4610 - Hide Disabled Issues
The end user setting Hide Disabled Devices does not appear to be 100% functional
2022-03-11 16:40:51 -05:00
TheWitness a8dce7beb5 QA: Audit of set_config_option()
If you change your default login method, it is not replicated to the data collectors
2022-03-11 12:12:08 -05:00
TheWitness cbe82ca4b2 Fixing Issue #4602 - undefined function get_guest_account
Had to move these two functions back to lib/functions.php due to the loading order.  No way to get around it.
2022-03-10 08:30:56 -05:00
TheWitness 06a2d429d2 Fixing Issue #4593 - Auth Tokens don't use realm
Cacti 'remember-me' does not work with identical usernames from different realms
2022-03-02 17:15:55 -05:00
TheWitness aadabe5697 One last fix. 2022-03-01 21:20:07 -05:00
TheWitness bcc1374e31 One more attempt to clear the errors 2022-03-01 21:15:23 -05:00
TheWitness 95b09adba3 Fixing my Fix. 2022-03-01 21:11:52 -05:00
TheWitness 238b9b36ae QA: Fixing issue with Graph Limits 2022-03-01 21:00:32 -05:00
TheWitness ff99be855f QA: Last fix to #4587
Moving too fast.  Slow down.
2022-03-01 13:35:07 -05:00
TheWitness 51ff282bcd Fixing More issues around #4587
Seems that the SESSION variable starts in a awkward place.  This fix has everything working again.  I can confirm now in the general log that the settings table no longer get's thrashed.
2022-03-01 13:12:18 -05:00
TheWitness 058cc58a8f Final fix to issue #4565 - Redirect Loops with mod_auth_melon and azure
This should fix much of the issue.  There is still a chance that this fix may not be sufficient in all cases, but it'll catch just about all.
2022-02-28 21:25:00 -05:00
TheWitness 556d0d016a QA: missed policy_trees 2022-02-28 19:14:36 -05:00
TheWitness 5bbb1a3602 QA: Make User Group Admin consistent with User Admin
- This change moves the function get_permission_string() to lib/auth.php
- Additionally, it makes the "Details" display on the Graph permissions consistent with the User Administration page.
2022-02-28 08:36:44 -05:00
TheWitness d146eb478d QA: Missed user check in lib/auth.php 2022-02-27 16:06:39 -05:00
TheWitness 09712810ca QA on the last commit 2022-02-27 15:44:07 -05:00
TheWitness 5d1b8e6183 Fixing Multiple Bugs and one Feature #4576, #4579, #4573, #4575, #4577, #4578, #4574
-security#4576: Stored XSS Issue in Cacti Device, Graph, Graph Template, and Graph Items callbacks
-security#4579: Cacti account lockout policies are not properly applied to LDAP and Domain Users
-issue#4573: The Cacti permission system does not scale to very large installations
-issue#4575: When you delete a user, their 'remember me' cookie data is not automatically removed
-issue#4576: Stored XSS Issue in Cacti Device, Graph, Graph Template, and Graph Items callbacks
-issue#4577: Cacti allows you to disable the currently logged in administrator disabling the user
-issue#4578: The Cacti login algorithm is complicated to understand due to too much strait line code
-feature#4574: Cacti needs some additional permission methods for larger installations

This change properly documents the file lib/auth.php using phpDocument format, and performed multiple sanity and readability changes such as the renaming of variables commonly used in multiple functions.

The the restructuring of the three authentication files:

- auth_login.php
- include/auth.php
- lib/auth.php

Makes the code more readable, it's not a complete solution, however, it is much easier to follow now.
2022-02-27 15:26:28 -05:00
TheWitness 37cee9f2d4 QA: On User and Group Console Options
Don't allow the user to check the Console login option unless they have access to it.
2022-02-24 18:56:26 -05:00
TheWitness 49f2bc414e Instrumentation for #4565
This will add more logging for troubleshooting
2022-02-24 18:27:32 -05:00
TheWitness be018f1fe8 QA: Correct two performance problems rendering report items on large systems 2022-02-22 10:09:02 -05:00
TheWitness 6b0879b531 Fixing Permission Change Detection for #4545
This one renames a Javascript function and properly checks the session for permission changes.
2022-02-07 20:05:27 -05:00
TheWitness 82b229db9e Updating Copyright to 2022. 2022-02-06 17:16:20 -05:00
TheWitness c515bb50f8 Fixing Issue #4545 Reports User is always an admin
- Reports Tab always shows 'Administration' despite a users permissions
- Improves the caching of permissions to include both true and false to reduce page query load.
- Also short circuits is_realm_allowed() for CLI's
- The user and admin realms where flipped.
2022-02-05 21:54:08 -05:00
TheWitness 30efc6622c Cacti using the wrong function to test variable
This issue is highly PHP version dependent.  Came up today for me.
2022-01-31 18:19:52 -05:00
TheWitness d809a368d7 Adding three minor features associated with user management
* Allow the get_template_account() function to be hookable by third party plugin
* Allow The User Management interface to be filterable by Realm
* Prevent Template User Accounts from being Removed
* Move the get_guest_account() and get_template_account() functions into lib/auth.php
2022-01-30 11:57:18 -05:00
TheWitness a108a6ec16 Fixing Issue #4536 - Basic Auth Issues
* After authenticating via Web Basic Authentication, user always mapped as guest.
* This is a slight redesign to make provide a better flow.  It will require rework to merge back to develop.
* deprecated use of display_custom_error_message()
* Add custom error message for basic authentication
* Fix some display issues on the settings page related to new settings.
* Make it clear in the cacti.log that LOGIN messages are failed or otherwise.
2022-01-29 15:03:44 -05:00
TheWitness 26e2dbacf2 Fixing Issue #4530 - Reports Interface Unusable
Cacti's Reporting Interface is NOT Usable on Large Systems
2022-01-23 19:47:01 -05:00
TheWitness 2c5224f042 Issue #4425 - Cache time not saved
The cache was loaded, but the last loaded date was not set.
2021-10-26 10:51:32 -04:00
TheWitness 65e63dfea4 One more performance bottleneck around #4425
The simple permissions would not take affect due to many calls to get_allowed_devices() not including the user, for example `tree.php?action=edit`
2021-10-26 10:13:46 -04:00
TheWitness e514a54c27 Remove duplicate database turn for #4425
This is the last optimization related to this bug fix.
2021-10-21 21:09:35 -04:00
TheWitness fad85312d4 Additional performance tuning on #4425 2021-10-20 21:45:12 -04:00
TheWitness de8b1d3896 Additional QA on #4425
It turns out that SELECT DISTINCT is very expensive vs. SELECT something, COUNT(*) AS something ... GROUP BY something
2021-10-16 11:08:22 -04:00
TheWitness a343a06485 Additional change around #4425
This adds a faster permission check for Graph Templates
2021-10-16 10:08:14 -04:00
TheWitness 96bca87b9f Fixing Issue #4425 - Permission Caching
Rendering large trees slowed due to lack of permission caching
2021-10-16 09:04:58 -04:00
TheWitness 8af84e4b11 Fixing #4228 - Redirect ssues after login
- Redirection issues after login under specific circumstances
2021-04-13 08:35:19 -04:00
TheWitness 87576d7a3a Fixing Issue #4190 - Augmenting roles inconsistent
- Augmenting roles can incorrectly map realms to roles in select cases
2021-03-22 10:03:52 -04:00
TheWitness fcae2c51e7 Adding Simple Device to #4177 Resolution 2021-03-19 19:54:04 -04:00
TheWitness 8a708579db Minor SQL Issue around #4177 2021-03-19 08:45:40 -04:00
TheWitness 0435b44c3a Fixing Issue #4177
On large sites, getting authorized graphs and graph templates is slow
2021-03-18 19:58:29 -04:00
TheWitness bf292d5d57 Additional update on #4035
This is based upon recommendations. to pre-sanitize the referer always and we don't want to double sanitize.
2021-01-06 12:15:22 -05:00
TheWitness df54a4a3f3 Updating copright years 2021-01-01 20:28:58 -05:00
TheWitness 0f3c1fe57b Fixing Issue #3933
When changing permissions, if those permissions are from the current user, they dont take effect till next login
2020-11-21 10:45:00 -05:00
TheWitness 52bb6ffda7 Remove all remaining instances to "sizeof(" or "count(" in code
* Some insances in the vendor directory have not been handled to maintain pedigree.
2020-10-21 08:27:42 -04:00
TheWitness 8e7754a7cf Fixing Issue #3781
Cacti V1.2.14 php backtraces on Auth.php errors upon login
2020-09-06 19:52:24 -04:00
netniV 1cf6f42e43 Fix issue with #3551
Closes #3551
Closes #3564
2020-05-19 21:00:04 +00:00
TheWitness c1233947e6 Fixing Issue #3551
Web Basic Authentication and Template User broken in 1.2.12
2020-05-11 19:31:39 -04:00
TheWitness 6a2d781778 Fixing Issue #3374 Cacti Cookie Domain
* Allow Setting of Cookie 'Cacti' domain edition
* This also allows the Cacti administrator to extend the content security policy to include unsafe-eval for scripts.
2020-03-24 19:12:48 -04:00
TheWitness ec0d1f8422 Regression related to automatic logout and guest account for issue #3343 2020-03-24 18:13:16 -04:00
TheWitness 68b2dac89e Fixing Issue #1990
Plugin Realm should have a 'role' to help maintain changes between plugins
2020-03-19 18:54:34 -04:00
TheWitness 469ab1dfaa More upgrade testing 2020-03-15 10:26:29 -04:00