Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksejs Sestakovs <aleksejs.sestakovs@zabbix.com>2019-11-08 17:07:01 +0300
committerAleksejs Sestakovs <aleksejs.sestakovs@zabbix.com>2019-11-08 17:08:16 +0300
commit66e829854427bdb57415c03166481794220555ae (patch)
tree4beaab8c28234cd813fdb5c55b436cf904e77d44 /tests/zabbix_server/preprocessor
parentd2b9f060d0fa2a4916cf6730001def531723d5c2 (diff)
.......PS. [ZBX-16883] fixed possible out of bounds access in csv to json preprocessing
* commit '43ec6061a2cb3178d262899b1215015768a556cd': .D........ [ZBX-16883] fixed ChangeLog entry ........S. [ZBX-16883] added check for invalid utf8 ........S. [ZBX-16883] fixed possible out of bounds access in csv to json preprocessing (cherry picked from commit 46ef668b76a16e4e916b71b6293a5356ff1ca790)
Diffstat (limited to 'tests/zabbix_server/preprocessor')
-rw-r--r--tests/zabbix_server/preprocessor/item_preproc_csv_to_json.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/zabbix_server/preprocessor/item_preproc_csv_to_json.yaml b/tests/zabbix_server/preprocessor/item_preproc_csv_to_json.yaml
index 899c0e89c06..127c1dc7cbf 100644
--- a/tests/zabbix_server/preprocessor/item_preproc_csv_to_json.yaml
+++ b/tests/zabbix_server/preprocessor/item_preproc_csv_to_json.yaml
@@ -440,6 +440,38 @@ out:
result: ''
return: 'FAIL'
---
+test case: 'unclosed quoted field (UTF8-2)'
+in:
+ csv: 'col1,ыcol1'
+ params: "\nы\n0"
+out:
+ result: ''
+ return: 'FAIL'
+---
+test case: 'unclosed quoted field (UTF8-3)'
+in:
+ csv: 'col1,ꢂcol1'
+ params: "\nꢂ\n0"
+out:
+ result: ''
+ return: 'FAIL'
+---
+test case: 'unclosed quoted field (UTF8-4)'
+in:
+ csv: 'col1,😀col1'
+ params: "\n😀\n0"
+out:
+ result: ''
+ return: 'FAIL'
+---
+test case: 'escaped quotation character in unclosed quoted field (UTF8-3)'
+in:
+ csv: 'col1,ꢂcol1ꢂꢂ'
+ params: "\nꢂ\n0"
+out:
+ result: ''
+ return: 'FAIL'
+---
test case: 'missing delimiter or line break after quoted field'
in:
csv: 'col1,"col1" '