Fix handling of string-list format values for date tests in Out of Office (#10075)

This commit is contained in:
Aleksander Machniak
2026-01-25 09:42:52 +01:00
parent d8363fbd7d
commit 719b8be259
3 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
- Fix handling of string-list format values for date tests in Out of Office (#10075)
* version 9.6 [2025-11-29]
-----------------------------------------------------------
- Show a warning when actions in wrong order (#10015, #6590)

View File

@@ -149,6 +149,14 @@ class rcube_sieve_vacation extends rcube_sieve_engine
}
}
// According to RFC5260, currentdate target can be a string-list,
// but here we support only a single value (#10074)
foreach ($rule['tests'] as $i => $r) {
if ($r['test'] == 'currentdate' && is_array($r['arg'])) {
$rule['tests'][$i]['arg'] = array_first($r['arg']);
}
}
$this->vacation = array_merge($rule['actions'][0], [
'idx' => $idx,
'disabled' => $rule['disabled'] || !$active,