6.0.0-alpha10
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
5/15/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8105] sieve driver doesn't check header field validity
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ . __ .__.. . | \ |/ `[__]|_/ |__/\__|\__.| || \
Comment
> Hello, > > > > when the user adds a invalid rule - for ex. over custom header > "replay-to:" where the colon is wrong, the user gets no feedback. The > script is saved to the server (the server ignores the wrong filter > rule) and the user doesn't know why the rule doesn't work. > > > > Here is my patched function - as in fact we include the > "INGO-Sieve-Script" from a main sieve script, so i disabled the > activation - only the script is uploaded/installed. > > > > /** > > * Sets a script running on the backend. > > * > > * @param string $script The sieve script. > > * > > * @return mixed True on success, PEAR_Error on error. > > */ > > function setScriptActive($script) > > { > > $res = $this->_connect(); > > if (is_a($res, 'PEAR_Error')) { > > return $res; > > } > > > > if (!strlen($script)) { > > return $this->_sieve->setActive(''); > > } > > > > $res = $this->_sieve->haveSpace($this->_params['scriptname'], > > strlen($script)); > > if (is_a($res, 'PEAR_ERROR')) { > > return $res; > > } > > > > // IMT PATCHED > > > > /* > > return $this->_sieve->installScript($this->_params['scriptname'], > > $script, true); > > */ > > $return = > $this->_sieve->installScript($this->_params['scriptname'], > > $script, false); > > > > > > // Check if the uploaded script is valid - server doesn't > return error when script is invalid, so here i fetch the script again > and check for errors. > > > > $tmp = $this->_sieve->getScript($this->_params['scriptname']); > > > > if (is_a($tmp, 'PEAR_ERROR')) > > return $tmp; > > > > > > return $return; > > > > } > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers