Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8569

Smarty-Email policies are not consistently enforced

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.4
    • Fix Version/s: 4.4.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Based on this wiki page, administrators may opt-in to Smarty-based email templating using define('CIVICRM_MAIL_SMARTY', ...):

      http://wiki.civicrm.org/confluence/display/CRMDOC40/Smarty+in+mail+templates

      This policy is enforced by CRM_Activity_BAO_Activity::sendEmail(...) and CRM_Mailing_BAO_Mailing::compose(...). However, there are some discrepancies in how its enforced by CRM_Core_BAO_MessageTemplates::sendReminder(...) and CRM_Core_BAO_ScheduleReminders::sendReminder(...):

      1. The sendReminder(...) functions always evaluate with Smarty, regardless of whether CIVICRM_MAIL_SMARTY is specified.
      2. The sendReminder(...) functions never enable $escapeSmarty when filtering the message body with CRM_Utils_Token::replaceHookTokens(...).
      3. The sendReminder(...) functions never enable $escapeSmarty when filtering the message subject with CRM_Utils_Token::replace*Tokens(...).
      4. CRM_Mailing_BAO_Mailing::compose(...) updates $smarty->security before and after evaluating templates; none of the others do the same.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: