security updates
have to check views and entityreference for custom patches
This commit is contained in:
@@ -39,6 +39,11 @@ function mimemail_permission() {
|
||||
'title' => t('Edit Mime Mail user settings'),
|
||||
'description' => t('Edit user specific settings for Mime Mail.'),
|
||||
),
|
||||
'send arbitrary files' => array(
|
||||
'title' => t('Send arbitrary files'),
|
||||
'description' => t('Attach or embed files located outside the public files directory.'),
|
||||
'restrict access' => TRUE,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,6 +138,7 @@ function mimemail_theme() {
|
||||
*/
|
||||
function mimemail_mail($key, &$message, $params) {
|
||||
$context = $params['context'];
|
||||
$options = array('clear' => TRUE);
|
||||
|
||||
// Prepare the array of the attachments.
|
||||
$attachments = array();
|
||||
@@ -156,16 +162,16 @@ function mimemail_mail($key, &$message, $params) {
|
||||
$params[$param_key] = empty($params[$param_key]) ? array() : explode(',', $params[$param_key]);
|
||||
if (!empty($params[$param_key])) {
|
||||
foreach ($params[$param_key] as $key => $address) {
|
||||
$params[$param_key][$key] = token_replace($address, $context);
|
||||
$params[$param_key][$key] = token_replace($address, $context, $options);
|
||||
}
|
||||
$message['headers'][$address_header] = implode(',', $params[$param_key]);
|
||||
}
|
||||
}
|
||||
|
||||
$message['to'] = token_replace($message['to'], $context);
|
||||
$message['subject'] = token_replace($context['subject'], $context);
|
||||
$message['body'][] = token_replace($context['body'], $context);
|
||||
$message['params']['plaintext'] = token_replace($params['plaintext'], $context);
|
||||
$message['to'] = token_replace($message['to'], $context, $options);
|
||||
$message['subject'] = token_replace($context['subject'], $context, $options);
|
||||
$message['body'][] = token_replace($context['body'], $context, $options);
|
||||
$message['params']['plaintext'] = token_replace($params['plaintext'], $context, $options);
|
||||
$message['params']['attachments'] = $attachments;
|
||||
}
|
||||
|
||||
@@ -347,7 +353,8 @@ function mimemail_prepare_message($message) {
|
||||
}
|
||||
}
|
||||
|
||||
$subject = str_replace(array(" \n", "\n"), '', trim(drupal_html_to_text($subject)));
|
||||
// Removing newline character introduced by _drupal_wrap_mail_line();
|
||||
$subject = str_replace(array("\n"), '', trim(drupal_html_to_text($subject)));
|
||||
|
||||
$hook = array(
|
||||
'mimemail_message__' . $key,
|
||||
|
Reference in New Issue
Block a user