oss-sec mailing list archives

Re: Re: CVE Request - roundcubemail


From: Florian Weimer <fw () deneb enyo de>
Date: Mon, 15 Dec 2008 11:32:00 +0100

* Jan Lieskovsky:

I think this is a documented feature of preg_replace with the "e"
flag, comparable to what happens when you use string concatenation to
create SQL statements.

Yes, according to:
http://bugs.php.net/bug.php?id=35960

the behavior of 'e' modifier in the preg_replace function is
expected and well documented feature:

http://php.net/manual/en/reference.pcre.pattern.modifiers.php

Nowhere in the documentation it says that "" quotes are unsafe when
combined with a sufficiently general capture pattern.

Do you happen to know if it's safe in all cases to use '' quotes
around the capture reference?  For instance, how does PHP deal with
MBCS in the replacement string?


Current thread: