[ZBX-17165] Incorrect validation rules for 4.4 XML import Created: 2020 Jan 10 Updated: 2024 Apr 10 Resolved: 2020 Feb 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 4.4.4 |
Fix Version/s: | 4.4.6rc1, 5.0.0alpha2, 5.0 (plan) |
Type: | Problem report | Priority: | Critical |
Reporter: | Ivo Kurzemnieks | Assignee: | Alexander Vladishev |
Resolution: | Fixed | Votes: | 1 |
Labels: | import, validation, xml | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||||||||||||||
Issue Links: |
|
||||||||||||||||
Team: | |||||||||||||||||
Sprint: | Sprint 60 (Jan 2020), Sprint 61 (Feb 2020) | ||||||||||||||||
Story Points: | 0.25 |
Description |
Zabbix version 4.4 export introduced constants and arrays. But the validation is done incorrectly. Let's say we have 4.2 XML file with strings: <tls_connect>4</tls_connect> <tls_accept>5</tls_accept> Importing to 4.2 here's what happens: <tls_accept> <option>NO_ENCRYPTION</option> <option>TLS_CERTIFICATE</option> </tls_accept> Here's the problem. The 4.4 validator accepts and validates strings XML_STRING, but in order to validate this array, there is a preprocessor called tlsAcceptConstantPreprocessor(). It changes the array to string. And that is wrong. This also creates problems for the future convertors and validators. See attached image for reference. The 4.4 validator should accept arrays as input. Host parameters like tls_accept is just one example. There are possibly more like this. Please check all XML validator preprocessors and parameters and make sure they accept the correct format. |
Comments |
Comment by Roberts Lataria (Inactive) [ 2020 Jan 15 ] |
Resolved in development branch feature/ZBX-17165-4.5, feature/ZBX-17165-4.4. |
Comment by Roberts Lataria (Inactive) [ 2020 Jan 31 ] |
Fixed in:
|