(CRM-15934) ensure new updates are properly escaped
authorJaka Kranjc <lynxlynxlynx@sourcemage.org>
Tue, 17 Feb 2015 21:51:23 +0000 (22:51 +0100)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 23 Feb 2015 10:29:33 +0000 (15:59 +0530)
iow doubly escaped

CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl
xml/templates/civicrm_data.tpl

index 8c0266e682637a4fa873ba6da532590c55fee84c..2f79941c9685ecdf856021748fa99c3d1984265e 100644 (file)
@@ -16,7 +16,7 @@ INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern)
       (@bounceTypeID, 'running out of disk space');
 
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = '(disk(space)?|over the allowed|exceed(ed|s)?|storage) quota' WHERE `id` = 87;
-UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = '(mail|in)(box|folder) ((for user \w+ )?is )?full' WHERE `id` = 92;
+UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = '(mail|in)(box|folder) ((for user \\w+ )?is )?full' WHERE `id` = 92;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'mailbox (has exceeded|is over) the limit' WHERE `id` = 93;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'quota ?(usage|violation|exceeded)' WHERE `id` = 98;
 
@@ -61,7 +61,7 @@ INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern)
       (@bounceTypeID, 'misconfigured forwarding address'),
       (@bounceTypeID, 'account is not allowed'),
       (@bounceTypeID, 'Address .<[^>]*>. not known here'),
-      (@bounceTypeID, 'Recipient address rejected: ([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}'),
+      (@bounceTypeID, 'Recipient address rejected: ([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}'),
       (@bounceTypeID, 'Non sono riuscito a trovare l.indirizzo e-mail'),
       (@bounceTypeID, 'nadie con esta direcci..?n'),
       (@bounceTypeID, 'ni bilo mogo..?e najti prejemnikovega e-po..?tnega naslova'),
@@ -71,7 +71,7 @@ INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern)
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'address(es)?( you (entered|specified))? (could|was)( not|n.t)( be)? found' WHERE `id` = 44;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'address(ee)? (unknown|invalid)' WHERE `id` = 45;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = '(mail )?delivery (to this user )?is not allowed' WHERE `id` = 59;
-UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'no such (mail drop|mailbox( \w+)?|(e-?mail )?address|recipient|(local )?user|person)( here)?' WHERE `id` = 64;
+UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'no such (mail drop|mailbox( \\w+)?|(e-?mail )?address|recipient|(local )?user|person)( here)?' WHERE `id` = 64;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'no mailbox (here )?by that name' WHERE `id` = 65;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'recipient (does not exist|(is )?unknown|rejected|denied|not found)' WHERE `id` = 69;
 UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'unknown (local( |-)part|recipient|address error)' WHERE `id` = 73;
@@ -79,10 +79,10 @@ UPDATE `civicrm_mailing_bounce_pattern` SET `pattern` = 'unknown (local( |-)part
 SELECT @bounceTypeID := max(id) FROM civicrm_mailing_bounce_type WHERE name = 'Spam';
 INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern)
     VALUES
-      (@bounceTypeID, 'Client host \[[^]]*\] blocked'),
+      (@bounceTypeID, 'Client host .[^ ]*. blocked'),
       (@bounceTypeID, 'automatic(ally-generated)? messages are not accepted'),
       (@bounceTypeID, 'denied by policy'),
-      (@bounceTypeID, 'has no corresponding reverse \(PTR\) address'),
+      (@bounceTypeID, 'has no corresponding reverse \\(PTR\\) address'),
       (@bounceTypeID, 'has a policy that( [^ ]*)? prohibited the mail that you sent'),
       (@bounceTypeID, 'is likely unsolicited mail'),
       (@bounceTypeID, 'Local Policy Violation'),
index b908f01a97dfca41ca9bdf86de23df4a1c3718b6..06cec0efd4c2df0896ceb1d24c84465797ec669b 100644 (file)
@@ -1257,7 +1257,7 @@ INSERT INTO civicrm_mailing_bounce_pattern
     (@bounceTypeID, 'message could not be forwarded'),
     (@bounceTypeID, 'missing or malformed local(-| )part'),
     (@bounceTypeID, 'no e-?mail address registered'),
-    (@bounceTypeID, 'no such (mail drop|mailbox( \w+)?|(e-?mail )?address|recipient|(local )?user|person)( here)?'),
+    (@bounceTypeID, 'no such (mail drop|mailbox( \\w+)?|(e-?mail )?address|recipient|(local )?user|person)( here)?'),
     (@bounceTypeID, 'no mailbox (here )?by that name'),
     (@bounceTypeID, 'not (listed in|found in directory|known at this site|our customer)'),
     (@bounceTypeID, 'not a valid( (user|mailbox))?'),
@@ -1281,7 +1281,7 @@ INSERT INTO civicrm_mailing_bounce_pattern
     (@bounceTypeID, 'misconfigured forwarding address'),
     (@bounceTypeID, 'account is not allowed'),
     (@bounceTypeID, 'Address .<[^>]*>. not known here'),
-    (@bounceTypeID, 'Recipient address rejected: ([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}'),
+    (@bounceTypeID, 'Recipient address rejected: ([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}'),
     (@bounceTypeID, 'Non sono riuscito a trovare l.indirizzo e-mail'),
     (@bounceTypeID, 'nadie con esta direcci..?n'),
     (@bounceTypeID, 'ni bilo mogo..?e najti prejemnikovega e-po..?tnega naslova'),
@@ -1316,7 +1316,7 @@ INSERT INTO civicrm_mailing_bounce_pattern
     (@bounceTypeID, 'exceeds allowed message count'),
     (@bounceTypeID, 'file too large'),
     (@bounceTypeID, 'full mailbox'),
-    (@bounceTypeID, '(mail|in)(box|folder) ((for user \w+ )?is )?full'),
+    (@bounceTypeID, '(mail|in)(box|folder) ((for user \\w+ )?is )?full'),
     (@bounceTypeID, 'mailbox (has exceeded|is over) the limit'),
     (@bounceTypeID, 'mailbox( exceeds allowed)? size'),
     (@bounceTypeID, 'no space left for this user'),
@@ -1378,10 +1378,10 @@ INSERT INTO civicrm_mailing_bounce_pattern
     (@bounceTypeID, 'blocked by a user configured filter'),
     (@bounceTypeID, '(detected|rejected) as spam'),
     (@bounceTypeID, 'X-HmXmrOriginalRecipient'),
-    (@bounceTypeID, 'Client host \[[^]]*\] blocked'),
+    (@bounceTypeID, 'Client host .[^ ]*. blocked'),
     (@bounceTypeID, 'automatic(ally-generated)? messages are not accepted'),
     (@bounceTypeID, 'denied by policy'),
-    (@bounceTypeID, 'has no corresponding reverse (PTR) address'),
+    (@bounceTypeID, 'has no corresponding reverse \\(PTR\\) address'),
     (@bounceTypeID, 'has a policy that( [^ ]*)? prohibited the mail that you sent'),
     (@bounceTypeID, 'is likely unsolicited mail'),
     (@bounceTypeID, 'Local Policy Violation'),