From 4d00ef28774daafd5e8d4a9b48ab83f7fe35bfb8 Mon Sep 17 00:00:00 2001 From: Jaka Kranjc Date: Tue, 17 Feb 2015 22:51:23 +0100 Subject: [PATCH] (CRM-15934) ensure new updates are properly escaped iow doubly escaped --- CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl | 10 +++++----- xml/templates/civicrm_data.tpl | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl index 8c0266e682..2f79941c96 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.alpha6.mysql.tpl @@ -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'), diff --git a/xml/templates/civicrm_data.tpl b/xml/templates/civicrm_data.tpl index b908f01a97..06cec0efd4 100644 --- a/xml/templates/civicrm_data.tpl +++ b/xml/templates/civicrm_data.tpl @@ -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'), -- 2.25.1