Commit Graph
135 Commits
Author SHA1 Message Date
Tony Roman 519b35f5cd Update copyright to 2018 2018-01-06 09:10:15 -05:00
netniV 2fe2b63e2d Fix for Issue #1157 (#1160)
SQL Statements have now been corrected to prevent erroring during COUNT() and when using different auth method
2017-12-30 08:42:36 -06:00
cigamit a56fc119e6 Resolving Issue #1157
Resolving issue with branch permission API
2017-12-29 09:08:16 -06:00
cigamit 475b2f408d Minor format issues after merge of #1129 2017-12-23 13:50:56 -06:00
netniV 979373fea4 Fix issue #1122 - Local user login fails with Multi/Single LDAP enabled (#1129)
* Fix issue #1122 - Local user login fails with Multi/Single LDAP enabled

Code was not consistent with how it was generating the password hashes and comparing them. To fix this, added compat_password_xxx functions that check for the availability of the newer password_xxx functions and if not present revert back to the md5 version.

Changes made are:

auth_changepassword.php:
* Break out of switch when error message set
* Reduce duplication of code when checking passwords
* Use local variables rather than constantly pulling in request ones
* Use new compat_password_xxx functions

auth_login.php:
* Added some debug logging to identify login issues
* Allow local login even if using ldap
* Use new compat_password_xxx functions
* Remove password from SQL search as hash can change and we don't know what it would have been at the time it was set

user_admin.php
* Use new compat_password_xxx functions

lib\auth.php:
* Added compat_password_verify, compat_password_hash and compat_password_rehash to check for PHP 5.7+ compatible functions other use MD5
* Reduced SQL query to just required user in secpass_login_process()
* Fixed password check in secpass_check_history()
* Fixed return value check of secpass_check_pass() in secpass_login_process()
* Use new compat_password_xxx functions

* Update CHANGELOG

* Fixup for Issue #1122, corrects some minor issues

* Merge branch 'Issue-1122' of https://github.com/netniV/cacti into Issue-1122

Update log message to be warning notj ust a normal message

* Fix issue of local auth bypas

* Update CHANGELOG

Fix up CHANGELOG issues

* Update auth.php

Fix up formatting issues
2017-12-23 12:58:03 -06:00
cigamit 139ec68a70 Be more consistent with feature 1.2 branch.
Note that this does not break functionality in 1.1.x.
2017-12-03 09:07:09 -06:00
cigamit 801d4e0b70 Resolve SQL/permission issues with get_allowed_graph_templates
This occurred due to the optimizations in pull request #1101.  The
$sql_user must, in it's entirety, be enclosed in parenthesis.
Otherwise, expand host functionality breaks.

I've also added the site_id in this commit to reduce the effort in
attempting to maintain both the feature branch and the develop branch.
It's not used, but returned.
2017-12-03 08:59:01 -06:00
cigamit 708be5b19f Cleanup after pull request #1177
Cleanup includes some misqueues in the pull request as well as some
other miscelaneous changes associated with how we have landed on
formatting.

Chagne include:
* No soft tabs on initial tabbing
* ON clause of JOIN should be capitalized and on separate line
* AND/OR should be capitalized in SQL Queries
* Formatting of db_..() functions calls
* Use of sizeof() instead of isset() for array checks
* i18n of Secpass check return values
* Remove trailing whitespace from lines

- ToDo: Remove more having in place of WHERE clauses
2017-12-02 10:26:34 -06:00
netniV 563e1ae09c Fixes for issues #1084, #1106 and #1116 (#1117)
* Fixes for issues 1106 (Graph filters), 1084 (Tree Branch population), and 1116 (Device Template won't set to none)

* Updated changelog\nfor issues #1084, #1106 and #1116
2017-12-02 10:57:08 -05:00
Patrick 50b358a194 Small rewrite/optimisation for auth query in issue #1091 (#1101) 2017-11-26 08:47:06 -06:00
cigamit bea58d8fce Resolving Issue #958
User Group Tree permissions not resolved fully.
2017-11-04 20:19:07 -05:00
cigamit 223780bcec Resolving Issue #1012
Issue where disabled devices do not appear on the tree edit page.
2017-11-04 19:51:57 -05:00
cigamit 9cd66a045d Minor format changes for readablilty only. No functional changes 2017-10-28 15:04:09 -05:00
Wolfgang Stöggl 4a1a15d72c Correct spelling of RRDtool (#1038)
- Change RRDTool -> RRDtool with a lowercase t.
- Replace in all files except *.mo, *.po, *.pot
2017-10-16 11:32:05 -04:00
cigamit 7c46ee8de9 Resolving Issue #931
Aggregate graphs missing from list view
2017-08-27 08:48:21 -05:00
cigamit e08de31b34 Resolving Issue #904
Allow user to hide Graphs from disabled devices
2017-08-16 20:35:44 -05:00
cigamit 63fd0feb24 Resolving Iissue #880
Device drop down is limited to 20 devices and lacks a scroll bar
2017-07-29 13:30:11 -05:00
Tony Roman e7174c4046 Fix issue#788
- Fixed up invalid function call
 - Added default operator to cacti_version_compare function
2017-06-04 23:24:43 -04:00
Tony Roman ca8c8cd123 Move cacti_version_compare into main functions lib to be used
in non-install code
2017-06-04 21:33:15 -04:00
cigamit 15ea20b7c7 Make default items dropdowns for autocomplete 20 instead of 30 2017-05-27 07:33:10 -05:00
cigamit fbaf6bfa51 Add api to return authorized data sources
This is used for graph creation ajax callbacks
2017-05-21 11:49:18 -05:00
Patrick 9e3ab3bb67 Small Auth optimisations
- Alignment
2017-05-13 10:07:42 +02:00
Patrick bf20822a41 Small Auth optimisations 2017-05-12 21:50:20 +02:00
Patrick 2826a9b547 Small Auth optimisations
- better alignments and fixed some alignments
- removed some unused variables
2017-05-12 21:42:59 +02:00
Patrick 12905971a7 Small Auth optimisations
- better alignments and fixed some alignments
- applied some early returns
- some small optimisations by moving some function calls around
2017-05-12 21:30:49 +02:00
Tony Roman 8a179d7d7f Fix up to move if elseif else blocks to PSR 2017-05-07 19:57:36 -04:00
cigamit 753efac0f6 Correcting small SQL error in lib/auth.php 2017-05-04 19:02:45 -05:00
cigamit a31cc9d8b5 Fix SQL errors in gexport due to auth API errors 2017-05-01 07:14:47 -05:00
patrick f98e6541b5 Reverting changes because $user is required. 2017-04-29 00:31:28 +02:00
Patrick b154c3e89e Optimisations for tree view
lib/auth.php:
- is_device_allowed()
  - removed unused parameter $user
- get_allowed_tree_level()
  - removed unused parameter $user
- get_allowed_tree_content()
  - removed unused paramters $sql_where, $order_by, $limit, $total_rows and $user
  - refactored the code to apply for these unused parameters
- get_allowed_tree_header_graphs()
  - removed unused parameters $order_by, $limit, $total_rows and $user
  - refactored the code to apply for these unused parameters
- get_allowed_trees()
  - removed unused parameters $edit, $sql_where, $limit, $total_rows and $user
  - refactored the code to apply for these unused parameters

lib/functions.php:
- removed get_graph_tree_array() because it's unused after refactor

lib/html_tree.php
- draw_dhtml_tree_level():
  - removed unused parameter $graphing
  - removed unused global $config
- create_dhtml_tree()
  - removed unused global $config
  - refactored get_graph_tree_array() to alias: get_allowed_trees()

auth_profile.php:
  - refactored get_graph_tree_array(true) to alias: get_allowed_trees(true)
2017-04-28 18:16:46 +02:00
Patrick 48f41a5e6c Small optimisations for threeview
auth.php:
- defined tablenames for fields
2017-04-26 21:23:01 +02:00
Patrick e27a1b65da Small optimisations for threeview
- fixed several alignment issues

api_tree.php
- api_tree_rename_node() Removed 3 unused methodcalls
- api_tree_item_save() removed unused query
- api_tree_get_branch_ordering() defined fields in query

auth.php:
- defined tablenames for fields

html_tree.php
- draw_dhtml_tree_level_graphing()
  - removed unused parameter
  - moved get_allowed_graphs() call out of the foreach()

graph_view.php
- simplified the $matched queries
- typo in "update_timepsan" => "update_timespan"
2017-04-26 21:19:26 +02:00
cigamit 8f6fa03d8d Resolving Issue #533
User settings not cleared after saving profile
2017-04-07 17:26:28 -05:00
Patrick 9d1e8a4c6c Merge remote-tracking branch 'origin/develop' into develop 2017-04-04 10:53:48 +02:00
patrick d3012868fe More optimisations:
auth.php:
- get_auth_realms() small refactor
- is_graph_allowed() unused variable $graph and unnecessary if-statement
- auth_check_perms() one count of $objects instead of multiple
- is_device_allowed()unused variable $host and unnecessary if-statement
- is_graph_template_allowed()unused variable $template and unnecessary if-statement
- is_view_allowed() unnecessary if-statement

html_tree.php:
- 2x query refactor for use of index reference instead use of function
- deleted unused select statement

html_utility.php:
- isset_request_var() unnecessary if-statement
2017-04-03 20:57:36 +02:00
cigamit f442f4fea2 More precision in the SQL query 2017-04-01 15:46:15 -05:00
cigamit a930a879d5 Minor changes to correct for duplicate display lines. 2017-04-01 15:17:13 -05:00
cigamit be6f5b9543 Remediating SQL errors in Issue #389 2017-04-01 14:03:17 -05:00
Patrick f611eb2449 Refactor of recursive is_tree_branch_empty()
Applied early return routine
2017-03-24 11:47:55 +01:00
cigamit 01da9b11d6 Resolving Issue #436
Restricted user does not see graphs in tree view.  Also caught some
issues in the Tree Permissions section of both user and User Group's,
and additional Tree permissions when reproducing the users environment.
2017-03-19 13:18:48 -05:00
cigamit 8df49e1172 Resolving Issue #418 and #421 2017-03-14 19:12:40 -05:00
cigamit 2478b34219 Issue: Multiple domains not working as expected 2017-03-12 20:19:13 -05:00
cigamit 1730976b22 No need to check for existance of table 2017-02-05 13:27:32 -06:00
cigamit 72aeb5015d reduce query load on MySQL 2017-02-01 20:59:25 -06:00
cigamit c041171c6a Resolving Ieeue #247 2017-02-01 19:35:30 -06:00
cigamit 1de9c78eba Resolving Issue #241 2017-02-01 12:52:30 -06:00
cigamit 5eaab96735 Resolved Issue #235
Also resolving some missing i18n migrations and prepared statement
formatting.
2017-01-28 15:32:15 -06:00
cigamit 3658dcdf30 Wrong IP address in the user cache. 2017-01-16 13:57:33 -06:00
cigamit bd70e4c685 Reduce database calls. 2017-01-16 11:06:22 -06:00
cigamit 8cba1c17f5 Missing i18n of lib/auth.php 2017-01-12 21:29:28 -06:00