From c4232e3d4d98929909c02900d62a188479d4eccd Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 17 Mar 2010 18:25:31 +0100 Subject: [PATCH] MFB: Use preg_quote instead of quotemeta (Bug #8875). --- ingo/docs/CHANGES | 1 + ingo/lib/Script/Procmail/Recipe.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ingo/docs/CHANGES b/ingo/docs/CHANGES index f8817ffdd..b90cb59db 100644 --- a/ingo/docs/CHANGES +++ b/ingo/docs/CHANGES @@ -10,6 +10,7 @@ v2.0-git v1.2.4-cvs ---------- +[jan] Correctly escape addresses in procmail driver (Bug #8875). [jan] Fix procmail scripts when using composite headers (Bug #8804). [jan] Support some non-standard Date: headers in Sieve vacation rules (Request #8783). diff --git a/ingo/lib/Script/Procmail/Recipe.php b/ingo/lib/Script/Procmail/Recipe.php index 50fe06a4d..e49ecd681 100644 --- a/ingo/lib/Script/Procmail/Recipe.php +++ b/ingo/lib/Script/Procmail/Recipe.php @@ -301,21 +301,21 @@ class Ingo_Script_Procmail_Recipe break; case 'address': - $string .= '(.*\<)?' . quotemeta($condition['value']); + $string .= '(.*\<)?' . preg_quote($condition['value']); break; case 'not begins with': $reverseCondition = true; // fall through case 'begins with': - $string .= $prefix . quotemeta($condition['value']); + $string .= $prefix . preg_quote($condition['value']); break; case 'not ends with': $reverseCondition = true; // fall through case 'ends with': - $string .= '.*' . quotemeta($condition['value']) . '$'; + $string .= '.*' . preg_quote($condition['value']) . '$'; break; case 'not contain': @@ -323,7 +323,7 @@ class Ingo_Script_Procmail_Recipe // fall through case 'contains': default: - $string .= '.*' . quotemeta($condition['value']); + $string .= '.*' . preg_quote($condition['value']); break; } -- 2.11.0