Description
The XML import handlers in three files check import_text with:
if (trim(get_nfilter_request_var('import_text') != '')) {
Because of operator precedence, this evaluates the comparison first and passes a boolean to trim(). So the condition is effectively checking get_nfilter_request_var('import_text') != '' and does not trim the actual payload.
Affected locations:
syslog_alerts.php (around line 942)
syslog_reports.php (around line 804)
syslog_removal.php (around line 742)
Impact
Whitespace-only payloads are treated as non-empty and continue into import parsing, producing avoidable parse/validation failures instead of being treated as empty input.
Expected
Trim the payload string first, then compare:
if (trim(get_nfilter_request_var('import_text')) != '') {
This should be applied consistently in all three import handlers.