Fix bug #75355: preg_quote() does not quote # control character#2838
Fix bug #75355: preg_quote() does not quote # control character#2838Majkl578 wants to merge 1 commit intophp:masterfrom
Conversation
|
Does quoting # work when not in extended mode? |
|
It behaves the same in extended and normal mode: https://3v4l.org/f1eg0 Quoting documentation:
|
aa523e5 to
5fdc2b7
Compare
|
I'm somewhat concerned regarding the potential BC break. What if existing code is already properly escaping the |
|
Your code is not working now as well because |
Of course, you're right. Anyhow, it might be worthwhile to discuss this issue on internals to reach a larger audience. |
|
@Majkl578 please link back to internals discussion (via externals preferably) for future reference ... |
|
Merged as 8423534 into master. Given that we have already added characters to preg_quote in the past and given the potential security vector, I think it's reasonable to introduce this in the next minor. If this breaks someones code, they have the next year to report it... |
Fix for https://bugs.php.net/bug.php?id=75355.