diff --git a/civicrm.php b/civicrm.php index 633ddf476174244de8455051d5e1d905f3d8b596..7dc4c0acd24eb6a1aa72692f3007e034a97a2072 100644 --- a/civicrm.php +++ b/civicrm.php @@ -2,7 +2,7 @@ /* Plugin Name: CiviCRM Description: CiviCRM - Growing and Sustaining Relationships -Version: 5.13.0 +Version: 5.13.2 Author: CiviCRM LLC Author URI: https://civicrm.org/ Plugin URI: https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress diff --git a/civicrm/CRM/ACL/Form/WordPress/Permissions.php b/civicrm/CRM/ACL/Form/WordPress/Permissions.php index bad293c934c17f1d0567697ce7abc3b935b3501e..65191fb9793aed95be6ef1190364b5fd59b5a109 100644 --- a/civicrm/CRM/ACL/Form/WordPress/Permissions.php +++ b/civicrm/CRM/ACL/Form/WordPress/Permissions.php @@ -54,7 +54,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { } foreach ($wp_roles->role_names as $role => $name) { // Don't show the permissions options for administrator, as they have all permissions - if ( is_multisite() OR $role !== 'administrator') { + if ($role !== 'administrator') { $roleObj = $wp_roles->get_role($role); if (!empty($roleObj->capabilities)) { foreach ($roleObj->capabilities as $ckey => $cname) { diff --git a/civicrm/CRM/Contribute/Form/Task/Invoice.php b/civicrm/CRM/Contribute/Form/Task/Invoice.php index 4d02644bd4bb5d7990c429cda9cbcd246b9210dc..f2742ee109e2dfb00e38dfad622818ce66593646 100644 --- a/civicrm/CRM/Contribute/Form/Task/Invoice.php +++ b/civicrm/CRM/Contribute/Form/Task/Invoice.php @@ -301,7 +301,13 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $invoiceDate = date("F j, Y"); $dueDate = date('F j, Y', strtotime($contributionReceiveDate . "+" . $prefixValue['due_date'] . "" . $prefixValue['due_date_period'])); - $lineItem = CRM_Price_BAO_LineItem::getLineItemsByContributionID($contribID); + if ($input['component'] == 'contribute') { + $lineItem = CRM_Price_BAO_LineItem::getLineItemsByContributionID($contribID); + } + else { + $eid = $contribution->_relatedObjects['participant']->id; + $lineItem = CRM_Price_BAO_LineItem::getLineItems($eid, 'participant', NULL, TRUE, FALSE, TRUE); + } $resultPayments = civicrm_api3('Payment', 'get', [ 'sequential' => 1, diff --git a/civicrm/CRM/Upgrade/Incremental/Base.php b/civicrm/CRM/Upgrade/Incremental/Base.php index 1ee17e37e8568bc7c8df863d7f0e2708831aa0e6..c787ca4ac2cd683ad702db5f2bf98948f5f4a328 100644 --- a/civicrm/CRM/Upgrade/Incremental/Base.php +++ b/civicrm/CRM/Upgrade/Incremental/Base.php @@ -156,12 +156,12 @@ class CRM_Upgrade_Incremental_Base { $domain = new CRM_Core_DAO_Domain(); $domain->find(TRUE); $queries = []; - if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, $column)) { + if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, $column, FALSE)) { if ($domain->locales) { if ($localizable) { $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales); foreach ($locales as $locale) { - if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, "{$column}_{$locale}")) { + if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, "{$column}_{$locale}", FALSE)) { $queries[] = "ALTER TABLE `$table` ADD COLUMN `{$column}_{$locale}` $properties"; } } diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.13.1.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.13.1.mysql.tpl new file mode 100644 index 0000000000000000000000000000000000000000..b505b4d89dd6b7a4287da1a37801efb0d42eedb8 --- /dev/null +++ b/civicrm/CRM/Upgrade/Incremental/sql/5.13.1.mysql.tpl @@ -0,0 +1 @@ +{* file to handle db changes in 5.13.1 during upgrade *} diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.13.2.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.13.2.mysql.tpl new file mode 100644 index 0000000000000000000000000000000000000000..62914f14d36c4bce282134a4b53e0b090943da76 --- /dev/null +++ b/civicrm/CRM/Upgrade/Incremental/sql/5.13.2.mysql.tpl @@ -0,0 +1 @@ +{* file to handle db changes in 5.13.2 during upgrade *} diff --git a/civicrm/CRM/Utils/System/WordPress.php b/civicrm/CRM/Utils/System/WordPress.php index d4ded8411fda073ae8f7e5439128b1369007de31..0ec9019e1f3b5c9df254f251c4bece6b205ef0ca 100644 --- a/civicrm/CRM/Utils/System/WordPress.php +++ b/civicrm/CRM/Utils/System/WordPress.php @@ -472,9 +472,6 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { $name = CRM_Utils_Array::value('name', $params); $pass = CRM_Utils_Array::value('pass', $params); - if (isset($params['uid'])) { - throw new \RuntimeException("Not implemented WordPress::loadBootStrap([uid=>\$num]))"); - } if (!defined('WP_USE_THEMES')) { define('WP_USE_THEMES', FALSE); @@ -500,7 +497,7 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { CRM_Core_Config::singleton()->userSystem->setMySQLTimeZone(); } require_once $cmsRootPath . DIRECTORY_SEPARATOR . 'wp-includes/pluggable.php'; - $uid = CRM_Utils_Array::value('uid', $name); + $uid = CRM_Utils_Array::value('uid', $params); if (!$uid) { $name = $name ? $name : trim(CRM_Utils_Array::value('name', $_REQUEST)); $pass = $pass ? $pass : trim(CRM_Utils_Array::value('pass', $_REQUEST)); @@ -823,13 +820,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base { $contactCreated = 0; $contactMatching = 0; - // previously used $wpdb - which means WordPress *must* be bootstrapped - $wpUsers = get_users(array( - 'blog_id' => get_current_blog_id(), - 'number' => -1, - )); + global $wpdb; + $wpUserIds = $wpdb->get_col("SELECT $wpdb->users.ID FROM $wpdb->users"); - foreach ($wpUsers as $wpUserData) { + foreach ($wpUserIds as $wpUserId) { + $wpUserData = get_userdata($wpUserId); $contactCount++; if ($match = CRM_Core_BAO_UFMatch::synchronizeUFMatch($wpUserData, $wpUserData->$id, diff --git a/civicrm/api/v3/Activity.php b/civicrm/api/v3/Activity.php index ff9ac1258c5bdb18d4644c059a356f9bd612988c..89402415080ab20af25349c347c453849845280f 100644 --- a/civicrm/api/v3/Activity.php +++ b/civicrm/api/v3/Activity.php @@ -300,6 +300,7 @@ function _civicrm_api3_activity_get_spec(&$params) { function civicrm_api3_activity_get($params) { $options = _civicrm_api3_get_options_from_params($params, FALSE, 'Activity', 'get'); $sql = CRM_Utils_SQL_Select::fragment(); + _civicrm_activity_get_handleSourceContactNameOrderBy($params, $options, $sql); _civicrm_api3_activity_get_extraFilters($params, $sql); @@ -336,6 +337,41 @@ function civicrm_api3_activity_get($params) { return civicrm_api3_create_success($activities, $params, 'Activity', 'get'); } +/** + * Handle source_contact_name as a sort parameter. + * + * This is passed from the activity selector - e.g search results or contact tab. + * + * It's a non-standard handling but this api already handles variations on handling source_contact + * as a filter & as a field so it's in keeping with that. Source contact has a one-one relationship + * with activity table. + * + * Test coverage in CRM_Activity_BAO_ActivtiyTest::testGetActivitiesforContactSummaryWithSortOptions + * + * @param array $params + * @param array $options + * @param CRM_Utils_SQL_Select $sql + */ +function _civicrm_activity_get_handleSourceContactNameOrderBy(&$params, &$options, $sql) { + $sourceContactID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_ActivityContact', 'record_type_id', 'Activity Source'); + if (!empty($options['sort']) && in_array($options['sort'], [ + 'source_contact_name', + 'source_contact_name desc', + 'source_contact_name asc' + ])) { + $order = substr($options['sort'], -4) === 'desc' ? 'desc' : 'asc'; + $sql->join( + 'source_contact', + "LEFT JOIN + civicrm_activity_contact ac ON (ac.activity_id = a.id AND record_type_id = #sourceContactID) + LEFT JOIN civicrm_contact c ON c.id = ac.contact_id", + ['sourceContactID' => $sourceContactID] + ); + $sql->orderBy("c.display_name $order"); + unset($options['sort'], $params['options']['sort']); + } +} + /** * Support filters beyond what basic_get can do. * diff --git a/civicrm/bower_components/jquery-ui/.bower.json b/civicrm/bower_components/jquery-ui/.bower.json index d28097dd886aa3254e1ae3f4b4c31a9a08723e8e..a37977e293dab1139234c1e11ff472e0011d1161 100644 --- a/civicrm/bower_components/jquery-ui/.bower.json +++ b/civicrm/bower_components/jquery-ui/.bower.json @@ -17,6 +17,6 @@ "commit": "44ecf3794cc56b65954cc19737234a3119d036cc" }, "_source": "https://github.com/components/jqueryui.git", - "_target": "~1.12", + "_target": ">=1.9", "_originalSource": "jquery-ui" } \ No newline at end of file diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php index 661b4f35df09f2130391862e85b9d9f1acc7d0b4..44fe45856db491bcedf3012a7933bae3ad755b7a 100644 --- a/civicrm/civicrm-version.php +++ b/civicrm/civicrm-version.php @@ -1,7 +1,7 @@ <?php /** @deprecated */ function civicrmVersion( ) { - return array( 'version' => '5.13.0', + return array( 'version' => '5.13.2', 'cms' => 'Wordpress', 'revision' => '' ); } diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md index 50706777aa05b2b30034c2195252cd872eadc6be..caaac6a198a8bf03bf3cefdf60acdf36b7ca9f8a 100644 --- a/civicrm/release-notes.md +++ b/civicrm/release-notes.md @@ -14,6 +14,28 @@ Other resources for identifying changes are: * https://github.com/civicrm/civicrm-joomla * https://github.com/civicrm/civicrm-wordpress +## CiviCRM 5.13.2 + +Released May 6, 2019 + +- **[Synopsis](release-notes/5.13.2.md#synopsis)** +- **[Features](release-notes/5.13.2.md#features)** +- **[Bugs resolved](release-notes/5.13.2.md#bugs)** +- **[Miscellany](release-notes/5.13.2.md#misc)** +- **[Credits](release-notes/5.13.2.md#credits)** +- **[Feedback](release-notes/5.13.2.md#feedback)** + +## CiviCRM 5.13.1 + +Released May 2, 2019 + +- **[Synopsis](release-notes/5.13.1.md#synopsis)** +- **[Features](release-notes/5.13.1.md#features)** +- **[Bugs resolved](release-notes/5.13.1.md#bugs)** +- **[Miscellany](release-notes/5.13.1.md#misc)** +- **[Credits](release-notes/5.13.1.md#credits)** +- **[Feedback](release-notes/5.13.1.md#feedback)** + ## CiviCRM 5.13.0 Released May 1, 2019 diff --git a/civicrm/release-notes/5.13.1.md b/civicrm/release-notes/5.13.1.md new file mode 100644 index 0000000000000000000000000000000000000000..1dca67e4f11aa431c88d89baa60275e1502f29a3 --- /dev/null +++ b/civicrm/release-notes/5.13.1.md @@ -0,0 +1,39 @@ +# CiviCRM 5.13.1 + +Released May 2, 2019 + +- **[Synopsis](#synopsis)** +- **[Bugs resolved](#bugs)** +- **[Credits](#credits)** +- **[Feedback](#feedback)** + +## <a name="synopsis"></a>Synopsis + +| *Does this version...?* | | +|:--------------------------------------------------------------- |:-------:| +| Fix security vulnerabilities? | no | +| Change the database schema? | no | +| Alter the API? | no | +| Require attention to configuration options? | no | +| Fix problems installing or upgrading to a previous version? | no | +| Introduce features? | no | +| **Fix bugs?** | **yes** | + +## <a name="bugs"></a>Bugs resolved + +- **Fix upgrade failure on multilingual sites ([dev/core#931](https://lab.civicrm.org/dev/core/issues/931): [14187](https://github.com/civicrm/civicrm-core/pull/14187))** + +- **Fix regression in REST endpoint on WordPress ([dev/wordpress#26](https://lab.civicrm.org/dev/wordpress/issues/26): [14186](https://github.com/civicrm/civicrm-core/pull/14186))** + +## <a name="credits"></a>Credits + +This release was developed by the following authors and reviewers: + +Australian Greens - Seamus Lee; Megaphone Technology Consulting - Jon Goldberg; +Tadpole Collective - Kevin Cristiano; + +## <a name="feedback"></a>Feedback + +These release notes are edited by Tim Otten and Andrew Hunt. If you'd like to +provide feedback on them, please login to https://chat.civicrm.org/civicrm and +contact `@agh1`. diff --git a/civicrm/release-notes/5.13.2.md b/civicrm/release-notes/5.13.2.md new file mode 100644 index 0000000000000000000000000000000000000000..487b77845d091aa45705893d7087dfc0a31ed4d6 --- /dev/null +++ b/civicrm/release-notes/5.13.2.md @@ -0,0 +1,41 @@ +# CiviCRM 5.13.2 + +Released May 6, 2019 + +- **[Synopsis](#synopsis)** +- **[Bugs resolved](#bugs)** +- **[Credits](#credits)** +- **[Feedback](#feedback)** + +## <a name="synopsis"></a>Synopsis + +| *Does this version...?* | | +|:--------------------------------------------------------------- |:-------:| +| Fix security vulnerabilities? | no | +| Change the database schema? | no | +| Alter the API? | no | +| Require attention to configuration options? | no | +| Fix problems installing or upgrading to a previous version? | no | +| Introduce features? | no | +| **Fix bugs?** | **yes** | + +## <a name="bugs"></a>Bugs resolved + +- **Fix regression in sorting "Activities" tab by "source_name" ([dev/core#934](https://lab.civicrm.org/dev/core/issues/934): + [14194](https://github.com/civicrm/civicrm-core/pull/14194), [14204](https://github.com/civicrm/civicrm-core/pull/14204))** + +- **Fix regression in which inbound email attachments were saved as `.unknown`" ([dev/core#940](https://lab.civicrm.org/dev/core/issues/940): + [14207](https://github.com/civicrm/civicrm-core/pull/14207)** + +## <a name="credits"></a>Credits + +This release was developed by the following authors and reviewers: + +Wikimedia Foundation - Eileen McNaughton; CiviCRM - Tim Otten; Australian Greens - Seamus Lee; +Dave D; + +## <a name="feedback"></a>Feedback + +These release notes are edited by Tim Otten and Andrew Hunt. If you'd like to +provide feedback on them, please login to https://chat.civicrm.org/civicrm and +contact `@agh1`. diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql index c6a43baa4bafaa0f5a881048267f61a7cc70c9a0..3789b2def70ce4f4b0fe62f970cdd8c5b998c6af 100644 --- a/civicrm/sql/civicrm_data.mysql +++ b/civicrm/sql/civicrm_data.mysql @@ -24035,4 +24035,4 @@ INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) VALUES ( @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}'); -UPDATE civicrm_domain SET version = '5.13.0'; +UPDATE civicrm_domain SET version = '5.13.2'; diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql index a4074d2d517755f9d37e09dc5dfad82705c25862..16330e877786ed1a533eabc11d3db4682357285b 100644 --- a/civicrm/sql/civicrm_generated.mysql +++ b/civicrm/sql/civicrm_generated.mysql @@ -399,7 +399,7 @@ UNLOCK TABLES; LOCK TABLES `civicrm_domain` WRITE; /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */; -INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.13.0',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); +INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.13.2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */; UNLOCK TABLES; diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php index bd17c58d0a76a5c5008d186ac0b963e661ccd532..0a31cabc0e8d31d5707fdc0679d9b2ef8dfbcd36 100644 --- a/civicrm/vendor/autoload.php +++ b/civicrm/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202::getLoader(); +return ComposerAutoloaderInit285dea4ecfc38f35aab901dfc1c31a29::getLoader(); diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php index 69fb4cdff9d7d40935404cd8cc7e21460707295b..6dbe28b202a10f3baf8559857f357db24397ec73 100644 --- a/civicrm/vendor/composer/autoload_real.php +++ b/civicrm/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202 +class ComposerAutoloaderInit285dea4ecfc38f35aab901dfc1c31a29 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit285dea4ecfc38f35aab901dfc1c31a29', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit285dea4ecfc38f35aab901dfc1c31a29', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); @@ -31,7 +31,7 @@ class ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202 if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -52,19 +52,19 @@ class ComposerAutoloaderInit643e97e2eb0fe07bf7451a69c57d1202 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire643e97e2eb0fe07bf7451a69c57d1202($fileIdentifier, $file); + composerRequire285dea4ecfc38f35aab901dfc1c31a29($fileIdentifier, $file); } return $loader; } } -function composerRequire643e97e2eb0fe07bf7451a69c57d1202($fileIdentifier, $file) +function composerRequire285dea4ecfc38f35aab901dfc1c31a29($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php index 0bedf2b539639549f3ba5cfd2143b55d8efc65fb..4c1e1750001400edfbbe141300f8f42bda5774f2 100644 --- a/civicrm/vendor/composer/autoload_static.php +++ b/civicrm/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202 +class ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29 { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -435,11 +435,11 @@ class ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$prefixesPsr0; - $loader->fallbackDirsPsr0 = ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$fallbackDirsPsr0; - $loader->classMap = ComposerStaticInit643e97e2eb0fe07bf7451a69c57d1202::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$prefixesPsr0; + $loader->fallbackDirsPsr0 = ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$fallbackDirsPsr0; + $loader->classMap = ComposerStaticInit285dea4ecfc38f35aab901dfc1c31a29::$classMap; }, null, ClassLoader::class); } diff --git a/civicrm/vendor/zetacomponents/mail/src/parser/interfaces/part_parser.php b/civicrm/vendor/zetacomponents/mail/src/parser/interfaces/part_parser.php index a81378b3ca08c18a4ae9d317c8cfff6b87649a7d..6c59e5a9609f21ac7ed2f4bbffbd7bba1e1ee9d5 100644 --- a/civicrm/vendor/zetacomponents/mail/src/parser/interfaces/part_parser.php +++ b/civicrm/vendor/zetacomponents/mail/src/parser/interfaces/part_parser.php @@ -168,7 +168,11 @@ abstract class ezcMailPartParser break; case 'text': - if ( ezcMailPartParser::$parseTextAttachmentsAsFiles === true ) + // dev/core#940 Ensure that emails are not processed as .unknown attachments by checking + // for Filename or name in the content-disposition and content-type headers. + if ( (ezcMailPartParser::$parseTextAttachmentsAsFiles === true) && + (preg_match('/\s*filename="?([^;"]*);?/i', $headers['Content-Disposition']) || + preg_match( '/\s*name="?([^;"]*);?/i' , $headers['Content-Type']) ) ) { $bodyParser = new ezcMailFileParser( $mainType, $subType, $headers ); } diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml index b59ddf4c174fd178e1dc3e74995fe0d2f32d8469..d0517d8f95108c6fd3f0d5885f7d9446621d4040 100644 --- a/civicrm/xml/version.xml +++ b/civicrm/xml/version.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="iso-8859-1" ?> <version> - <version_no>5.13.0</version_no> + <version_no>5.13.2</version_no> </version>