[ZBX-6816] error message has to be provided when entering incorrect group/host id's in latest.php?&form_refresh=1&groupid=XXX&hostid=XXX Created: 2013 Jul 23 Updated: 2017 May 30 Resolved: 2013 Sep 16 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | None |
Fix Version/s: | 2.1.4 |
Type: | Incident report | Priority: | Minor |
Reporter: | Egita Sidorova (Inactive) | Assignee: | Ivo Kurzemnieks |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
r37233 |
Attachments: |
![]() ![]() ![]() ![]() |
Description |
error message normally is provided, when incorrect params are entered by user hosts.php?form=update&hostid=50001&groupid=4440 works correctly, |
Comments |
Comment by Egita Sidorova (Inactive) [ 2013 Jul 23 ] |
(1) same applies to guntis.zarins RESOLVED in r37385. jelisejev CLOSED. |
Comment by Egita Sidorova (Inactive) [ 2013 Jul 23 ] |
(2) similar error srv_status.php?&form_refresh=1&fullscreen=0&period=XXX guntis.zarins RESOLVED in r37385. jelisejev CLOSED. |
Comment by Egita Sidorova (Inactive) [ 2013 Jul 25 ] |
(3) there is issue when no parameters are added to the url, system should produce an error, that doenst happen error message should state: Critical error. Field "XXX" is mandatory. example -screenedit.php guntis.zarins discoveryconf.php and actionconf.php show new form, if id not given. Other pages showed previous selected choice. Not found any problem here. iivs As discussed, this will not be fixed for now. The validation of ID's, however, is fixed. |
Comment by Guntis Zarins (Inactive) [ 2013 Jul 29 ] |
If in request is wrong groupid or hostid parameters ( have not permission or not exists ) PageFilter its values reset with default (equals 'All'). Is there required critical error message? jelisejev In such cases the page filter should not be displayed at all. |
Comment by Guntis Zarins (Inactive) [ 2013 Jul 29 ] |
RESOLVED in [svn://svn.zabbix.com/branches/dev/ZBX-6816] r37385. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 02 ] |
(1) In charts.php:68:
guntis.zarins RESOLVED in r37594. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 02 ] |
(2) A couple of code improvements: if (get_request('groupid', 0) > 0) { $groupId = available_groups($_REQUEST['groupid'], 0); if (!$groupId) { access_deny(); } }
The same for other similar code blocks. guntis.zarins jelisejev You can replace available_hosts() in hosts.php with a corresponding API call and remove all of these functions. guntis.zarins RESOLVED in r37738. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 02 ] |
(3) The following parameters are no longer used and must be removed:
guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 02 ] |
(4) In report2.php the following parameters must also be validated:
The validation must be different depending on the selected report mode. guntis.zarins RESOLVED in r37637. jelisejev guntis.zarins RESOLVED in r37740 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(5) In chart.php:
guntis.zarins RESOLVED in r37637. jelisejev I've made some minor corrections in r37714, please review. guntis.zarins CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(6) In chart2.php:
guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(7) In chart3.php the httptestid parameter must be validated. guntis.zarins RESOLVED in r37637. jelisejev It's better to move the permission check inside the "if ($httptestid = get_request('httptestid', false))" clause. Also, the item validation on line 103 should only allow normal items, not prototypes and LLD rules. guntis.zarins RESOLVED in r37742. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(8) In chart6.php - same as in (6). guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(9) In chart7.php - the "filter" parameter must not be overriden on line 56. guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(10) In chart_bar.php the following parameters must also be validated:
The validation must be different depending on the selected report mode. guntis.zarins RESOLVED in r37637. jelisejev The validation must allow to use web items in the report. Also spaces are missing after commas. guntis.zarins RESOLVED in r37742. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(11) In nodes.php the "nodeid" parameter must be validated. guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(12) In popup.php we need to validate:
guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(13) In report4.php the "media_type" parameter must be validated. guntis.zarins RESOLVED in r37637. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(14) In report6.php the following parameters need to be validated:
The validation must be different depending on the selected report mode. guntis.zarins RESOLVED in r37653. jelisejev guntis.zarins jelisejev That's the point, the should cause a warning, not a critical error. I've also made some changes in r37822. Please review. iivs Unrelated to those last changes, but to r37742: Undefined index: items [ in C:\Development\ZBX-6816\frontends\php\chart_bar.php:66] Previously if no items were specified, graph was shown as empty. I think there should be no graph displayed when no items are specified (and after deleted). jelisejev Great! There's one more problem left, when submitting the "compare values for multiple periods" form without an item, a warning must be shown instead of a critical error. iivs Changed critical to warning. jelisejev Minor corrections in r37987. Please review. iivs REVIEWED. oleg.egorov Undefined indexes and errors after item removing from "Distribution of values for multiple periods" and "Distribution of values for multiple items" tabs REOPEN iivs RESOLVED in r38411 oleg.egorov CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(15) In screens.php we need to validate:
If an unexisting elementid is given, it should display the standard access deny message instead of the one displayed currently. The following parameters need to be removed:
guntis.zarins RESOLVED in r37637. jelisejev guntis.zarins RESOLVED in r37742. jelisejev I've removed some more unused code in r37823. Please review. iivs REVIEWED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(16) In slides.php we need to validate:
The following parameters need to be removed:
guntis.zarins RESOLVED in r37637. jelisejev $slides is an incorrect name for this variable, since it contains a slideshow, not slides. guntis.zarins RESOLVED in r37742. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(17) In tr_logform.php we need to validated:
The following parameters need to be removed:
guntis.zarins RESOLVED in r37637. jelisejev Creating a trigger requires write permissions to the item. guntis.zarins RESOLVED in r37743. jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 05 ] |
(18) In users.php we need to validate "filter_usrgrpid". guntis.zarins RESOLVED in r37637. jelisejev userid and filter_usrgrpid validation must require write permissions. guntis.zarins RESOLVED in r37743 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 09 ] |
(19) There's a duplicate permission check in hostinventories.php:80. It should be removed. guntis.zarins RESOLVED in r37743 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 12 ] |
(20) There are a lot of minor coding style issues like missing spaces. Please review your changes and correct them. guntis.zarins RESOLVED in r37743 jelisejev I've made some additional changes in r37821 and r37826, please review. Eduards REOPEN, in getOnlyHostParam() "param" variable is redundant iivs RESOLVED in r37922, r37924 (code refactoring), r37925 (merged newest changes from trunk) jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Aug 20 ] |
TESTED. Please review (14) before merging. |
Comment by Ivo Kurzemnieks [ 2013 Aug 20 ] |
Fixed in pre-2.1.3 (trunk) r37990 |
Comment by Egita Sidorova (Inactive) [ 2013 Aug 22 ] |
issues found on hudson, please see comments |
Comment by Egita Sidorova (Inactive) [ 2013 Aug 22 ] |
(21) Use of two links with incorrect/correct itemid for following links related to Reports-Bar reports Please see TEST_SERVER_NAME Bar reports - Google Chrome_087.png for more information iivs RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-6816 r38287 oleg.egorov CLOSED |
Comment by Egita Sidorova (Inactive) [ 2013 Aug 22 ] |
(22) Use of two links with incorrect/correct params for following links related to Reports-Bar reports Please see TEST_SERVER_NAME Bar reports - Google Chrome_088.png for more information iivs RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-6816 r38287 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 11 ] |
(23) Please add in check_fields mandatory field "periods" (Distribution of values for multiple items tab) iivs RESOLVED in r38455, r38456 (code refactoring) oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 11 ] |
(24) Undefined index: calc_fnc [report6.php:208 → bar_report_form() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\reports.inc.php:98]Undefined index: axisside [report6.php:208 → bar_report_form() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\reports.inc.php:99] If in URL don't exist item parameters iivs RESOLVED in r38455, r38456 (code refactoring) oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 13 ] |
if items is array array_flip(): Can only flip STRING and INTEGER values! [report6.php:105 → CAPIObject->get() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CItem->get() → dbConditionInt() → array_flip() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\db.inc.php:1058] if color is array preg_match() expects parameter 2 to be string, array given [report6.php:186 → validateBarReportItems() → CStringValidator->validate() → preg_match() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\classes\validators\string\CStringValidator.php:96] if calc_fnc, axisside... is array Illegal offset type in isset or empty [report6.php:186 → validateBarReportItems() → CSetValidator->validate() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\classes\validators\CSetValidator.php:49] if groupid is array array_flip(): Can only flip STRING and INTEGER values! [report6.php:81 → CAPIObject->isReadable() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHostGroup->isReadable() → CHostGroup->get() → dbConditionInt() → array_flip() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\db.inc.php:1058] ... Same problems exist in popup Will be fixed in ZBX-6996 CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 13 ] |
(26) In item popup field parameter Same problem in "Compare values for multiple periods" iivs RESOLVED in r38495 oleg.egorov popup_bitem.php:117-120 I think better change to: $host = get_request('host'); $itemName = get_request('name'); if ($host && $itemName) { $caption = $host['name'].NAME_DELIMITER.$itemName; } iivs RESOLVED in r38514 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 13 ] |
(27) If groupids != array Argument 1 passed to CHostGroup::isReadable() must be of the type array, string given [report6.php:81 → CAPIObject->isReadable() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHostGroup->isReadable() in C:\xampp\htdocs\ZBX-6816\frontends\php\api\classes\CHostGroup.php:1005] Same problem if hostids != array Argument 1 passed to CHost::isReadable() must be of the type array, string given [report6.php:84 → CAPIObject->isReadable() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CHost->isReadable() in C:\xampp\htdocs\ZBX-6816\frontends\php\api\classes\CHost.php:1609] Will be fixed in ZBX-6996 CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 13 ] |
(28) Coding style Please rename functions: barReportForm, barReportForm2, barReportForm3 Review my changes in r38486 iivs REVIEWED. Additional code refactoring see in r38488 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 16 ] |
(29) Distribution of values for multiple periods report tab Add -> ERROR: Missing "calc_fnc" field for item. Same problem in other tabs iivs RESOLVED in r38515 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 16 ] |
(30) http://localhost/ZBX-6816/frontends/php/report6.php?sid=1546c7e5aa444e2a&form_refresh=1&form=1&config=1&report_timesince=20130915152424&report_timetill=20130916152424&title=Report+1&xlabel=&ylabel=&scaletype=3&report_timesince_day=15&report_timesince_month=09&report_timesince_year=2013&report_timesince_hour=15&report_timesince_minute=24&report_timetill_day=16&report_timetill_month=09&report_timetill_year=2013&report_timetill_hour=15&report_timetill_minute=24&new_graph_item[caption]=aaaa_item_2&new_graph_item[itemid]=|23687|&new_graph_item[color]=009900&new_graph_item[calc_fnc]=2&new_graph_item[axisside]=0 new_graph_item[itemid]=|23687| Undefined index: caption [report6.php:221 → valueDistributionFormForMultiplePeriods() in C:\xampp\htdocs\ZBX-6816\frontends\php\include\reports.inc.php:84] iivs RESOLVED in r38535 oleg.egorov Please fix coding style errors, camelCase for $already_exist, $new_gitem REOPEN iivs RESOLVED in r38554 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2013 Sep 17 ] |
Tested, by before merge please fix and close (30) |
Comment by Ivo Kurzemnieks [ 2013 Sep 17 ] |
Fixed in pre-2.1.5 (trunk) r38557 |