PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail » Bug #8699

slightly improved regex for header injection checking

Details

Submitted2006-09-14 14:43 UTC
Fromwerner at seagullproject dot org
Assignedjon
StatusClosed
PackageMail
PHP Version5.1.2
OSall
Roadmaps(Not assigned)

Comments

[2006-09-14 14:43 UTC] werner at seagullproject dot org

Description:
------------
We implemented the patch from http://pear.php.net/bugs/6229 earlier in Seagull PHP Framework and improved the regex:

Currently it's:

'=(<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r).*='

We have:

"#((<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*#i"

which would also match on <lf>

patch to follow

[2006-09-14 15:10 UTC] werner at seagullproject dot org

We implemented the patch from http://pear.php.net/bugs/6229
earlier in Seagull PHP Framework and improved the regex:

Currently it's:

'=(<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r).*='

We have:

"#((<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*#i"

which would also match on <lf>

patch is here: http://www.netwerkstatt.at/temp/sanitise_header_improvement.diff