Description
Describe the bug
Custom search commands exception out when non UTF-8 event data is present in the search pipeline
To Reproduce
- Create a custom command
- Pass non UTF-8 field data to the custom command (feel free to use invalid_utf8.csv)
Expected behavior
splunk-sdk-python (and all other potentially impacted SDK's) should handle encoding/decoding in the same manner as Splunk Core.
Logs or Screenshots
-
Not working
broken_search.log
Splunk (please complete the following information):
- Version: 8.2.5
- OS: Windows 10 Pro 19045.2486
- Deployment: single-instance
SDK (please complete the following information):
- Version: 1.7.2
- Language Runtime Version: Python 3.7
- OS: Windows 10 Pro 19045.2486
Additional context
My patch - to get my command working ASAP - was to change errors='strict'
to errors='replace'
here. I chose replace since it mimic's the functionality of Splunk. I didn't touch any other instances of errors='strict'
and only tested this against StreamingCommand
.
This bug is not limited to the inputlookup
command but it is the easiest way to reproduce.