diff --git a/profiles/wcm_base/CHANGELOG.txt b/profiles/wcm_base/CHANGELOG.txt index 1dcd4d515441733706f2da113b325626bf6e5fb7..95a733ad8caa245b7cc0d98b5a6a7625d00301b1 100644 --- a/profiles/wcm_base/CHANGELOG.txt +++ b/profiles/wcm_base/CHANGELOG.txt @@ -1,3 +1,10 @@ +WCM Base 7.x-1.13-rc1, 2019-03-13 +--------------------------------- +- WCM Base: + - Updated Views to 3.21 per SA-CONTRIB-2019-034, -035 and -036. + - Patched SMTP module to allow changing timeout value. +- OCIO SimpleSAMLphp Auth: Improved metadata location and logging. + WCM Base 7.x-1.12, 2019-03-07 ----------------------------- - WCM Base: Updated Fieldable Panels Panes to 1.12. diff --git a/profiles/wcm_base/modules/contrib/smtp/PATCHES.txt b/profiles/wcm_base/modules/contrib/smtp/PATCHES.txt index 24e25e7a1a6ab23b3174b7e34c3414149689a106..961955a429626532e2ee0f0de4046e065175b41a 100644 --- a/profiles/wcm_base/modules/contrib/smtp/PATCHES.txt +++ b/profiles/wcm_base/modules/contrib/smtp/PATCHES.txt @@ -1,5 +1,6 @@ The following patches have been applied to this project: - https://www.drupal.org/files/issues/2018-11-13/smtp-filepath_uri-2966816-27-D7_0.patch - https://www.drupal.org/files/issues/2018-06-04/2753115-41-smtp-multiple-to-addresses-error.patch +- https://www.drupal.org/files/issues/smtp-make_smtp_timeout_configurable-2781157-1.patch This file was automatically generated by Drush Make (http://drupal.org/project/drush). diff --git a/profiles/wcm_base/modules/contrib/smtp/smtp.admin.inc b/profiles/wcm_base/modules/contrib/smtp/smtp.admin.inc index ede79758bec2aa0c949e620839aab5b8c0666b64..c0deb5cd05c54ba78d9f64fd89034b2de5272c2d 100644 --- a/profiles/wcm_base/modules/contrib/smtp/smtp.admin.inc +++ b/profiles/wcm_base/modules/contrib/smtp/smtp.admin.inc @@ -73,6 +73,18 @@ function smtp_admin_settings() { '#default_value' => variable_get('smtp_port', '25'), '#description' => t('The default SMTP port is 25, if that is being blocked try 80. Gmail uses 465. See !url for more information on configuring for use with Gmail.', array('!url' => l(t('this page'), 'http://gmail.google.com/support/bin/answer.py?answer=13287'))), ); + $form['server']['smtp_timeout'] = array( + '#type' => 'textfield', + '#title' => t('SMTP timeout'), + '#size' => 6, + '#maxlength' => 6, + '#default_value' => variable_get('smtp_timeout', SMTP_TIMEOUT), + '#description' => t('The default SMTP timeout is 10. Raise this if you experience timeouts during mail sending.'), + ); + if (module_exists('elements')) { + $form['server']['smtp_timeout']['#type'] = 'numberfield'; + $form['server']['smtp_timeout']['#min'] = '1'; + } // Only display the option if openssl is installed. if (function_exists('openssl_open')) { diff --git a/profiles/wcm_base/modules/contrib/smtp/smtp.install b/profiles/wcm_base/modules/contrib/smtp/smtp.install index 609c807adedbf1ea0bfbe26b1c6aa6c0b2795e12..7d80cf678b16c25c3275eee98318da0870a1f861 100644 --- a/profiles/wcm_base/modules/contrib/smtp/smtp.install +++ b/profiles/wcm_base/modules/contrib/smtp/smtp.install @@ -52,6 +52,7 @@ function smtp_uninstall() { variable_del('smtp_on'); variable_del('smtp_password'); variable_del('smtp_port'); + variable_del('smtp_timeout'); variable_del('smtp_protocol'); variable_del('smtp_queue'); variable_del('smtp_queue_fail'); diff --git a/profiles/wcm_base/modules/contrib/smtp/smtp.mail.inc b/profiles/wcm_base/modules/contrib/smtp/smtp.mail.inc index f2a5d5e4bb034e50c858d4ad9dfe02e23211e816..9914d9cc58fd0507457db1e1c507b1c1e926399a 100644 --- a/profiles/wcm_base/modules/contrib/smtp/smtp.mail.inc +++ b/profiles/wcm_base/modules/contrib/smtp/smtp.mail.inc @@ -85,6 +85,9 @@ class SmtpMailSystem implements MailSystemInterface { $mailer->SMTPDebug = TRUE; } + // Make timeout configurable. + $mailer->Timeout = variable_get('smtp_timeout', SMTP_TIMEOUT); + // Set the from name. First we try to get the name from i18n, in the case // that it has been translated. The name is set according to the language // of the email being sent. diff --git a/profiles/wcm_base/modules/contrib/smtp/smtp.module b/profiles/wcm_base/modules/contrib/smtp/smtp.module index 0fe18eb070887c35940c914d4875b8cc221d476e..0f3612f5c10a9378b7a98f53ba36f31f1dd53c3f 100644 --- a/profiles/wcm_base/modules/contrib/smtp/smtp.module +++ b/profiles/wcm_base/modules/contrib/smtp/smtp.module @@ -30,6 +30,10 @@ define('SMTP_LOGGING_ALL', 1); */ define('SMTP_LOGGING_ERRORS', 2); +/** + * SMTP timeout -- in seconds. + */ +define('SMTP_TIMEOUT', 10); /** * Implements hook_help(). diff --git a/profiles/wcm_base/modules/contrib/views/handlers/views_handler_argument_null.inc b/profiles/wcm_base/modules/contrib/views/handlers/views_handler_argument_null.inc index ac668fbbeed9ec4a5eb209e9c5367175da20e3d0..afe0c6065ac1cb4f5f6a39962413354e7ef71a72 100644 --- a/profiles/wcm_base/modules/contrib/views/handlers/views_handler_argument_null.inc +++ b/profiles/wcm_base/modules/contrib/views/handlers/views_handler_argument_null.inc @@ -44,7 +44,7 @@ class views_handler_argument_null extends views_handler_argument { */ public function default_actions($which = NULL) { if ($which) { - if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) { + if (in_array($which, array('ignore', 'not found', 'empty', 'default', 'access denied'))) { return parent::default_actions($which); } return; diff --git a/profiles/wcm_base/modules/contrib/views/handlers/views_handler_field_serialized.inc b/profiles/wcm_base/modules/contrib/views/handlers/views_handler_field_serialized.inc index ae18712bc769d37d9dd0347c65aa3592c52debef..d0242b712660ab52126d17204045a6972a2fe484 100644 --- a/profiles/wcm_base/modules/contrib/views/handlers/views_handler_field_serialized.inc +++ b/profiles/wcm_base/modules/contrib/views/handlers/views_handler_field_serialized.inc @@ -71,7 +71,7 @@ class views_handler_field_serialized extends views_handler_field { return check_plain($value[$this->options['key']]); } - return $value; + return check_plain($value); } } diff --git a/profiles/wcm_base/modules/contrib/views/includes/handlers.inc b/profiles/wcm_base/modules/contrib/views/includes/handlers.inc index 0e7af4aece7b922117a6b27c33f26c20df5dfb3b..f05cba0eb0435ab88f1a5a95b07f4d489f37dd9a 100644 --- a/profiles/wcm_base/modules/contrib/views/includes/handlers.inc +++ b/profiles/wcm_base/modules/contrib/views/includes/handlers.inc @@ -996,58 +996,39 @@ class views_many_to_one_helper { return $this->handler->table_alias; } - // Case 2: it's an 'and' or an 'or'. + // Case 2: it's anything but an 'or'. // We do one join per selected value. - if ($this->handler->operator != 'not') { - // Clone the join for each table. - $this->handler->table_aliases = array(); - foreach ($this->handler->value as $value) { - $join = $this->get_join(); - if ($this->handler->operator == 'and') { - $join->type = 'INNER'; - } - $join->extra = array( - array( - 'field' => $this->handler->real_field, - 'value' => $value, - 'numeric' => !empty($this->handler->definition['numeric']), - ), - ); - // The table alias needs to be unique to this value across the - // multiple times the filter or argument is called by the view. - if (!isset($this->handler->view->many_to_one_aliases[$field][$value])) { - if (!isset($this->handler->view->many_to_one_count[$this->handler->table])) { - $this->handler->view->many_to_one_count[$this->handler->table] = 0; - } - $this->handler->view->many_to_one_aliases[$field][$value] = $this->handler->table . '_value_' . ($this->handler->view->many_to_one_count[$this->handler->table]++); + // Clone the join for each table: + $this->handler->table_aliases = []; + foreach ($this->handler->value as $value) { + $join = $this->get_join(); + if ($this->handler->operator == 'and') { + $join->type = 'INNER'; + } + if (empty($join->extra)) { + $join->extra = []; + } + $join->extra[] = [ + 'field' => $this->handler->real_field, + 'value' => $value, + 'numeric' => !empty($this->handler->definition['numeric']), + ]; + // The table alias needs to be unique to this value across the + // multiple times the filter or argument is called by the view. + if (!isset($this->handler->view->many_to_one_aliases[$field][$value])) { + if (!isset($this->handler->view->many_to_one_count[$this->handler->table])) { + $this->handler->view->many_to_one_count[$this->handler->table] = 0; } - $alias = $this->handler->table_aliases[$value] = $this->add_table($join, $this->handler->view->many_to_one_aliases[$field][$value]); - + $this->handler->view->many_to_one_aliases[$field][$value] = $this->handler->table . '_value_' . ($this->handler->view->many_to_one_count[$this->handler->table]++); + $alias = $this->handler->table_aliases[$value] = $this->add_table($join, + $this->handler->view->many_to_one_aliases[$field][$value]); // and set table_alias to the first of these. if (empty($this->handler->table_alias)) { $this->handler->table_alias = $alias; } } } - // Case 3: it's a 'not'. - // We just do one join. We'll add a where clause during the query phase - // to ensure that $table.$field IS NULL. - else { - $join = $this->get_join(); - $join->type = 'LEFT'; - $join->extra = array(); - $join->extra_type = 'OR'; - foreach ($this->handler->value as $value) { - $join->extra[] = array( - 'field' => $this->handler->real_field, - 'value' => $value, - 'numeric' => !empty($this->handler->definition['numeric']), - ); - } - - $this->handler->table_alias = $this->add_table($join); - } } return $this->handler->table_alias; } @@ -1081,12 +1062,7 @@ class views_many_to_one_helper { // Determine whether a single expression is enough(FALSE) or the conditions // should be added via an db_or()/db_and() (TRUE). $add_condition = TRUE; - if ($operator == 'not') { - $value = NULL; - $operator = 'IS NULL'; - $add_condition = FALSE; - } - elseif ($operator == 'or' && empty($options['reduce_duplicates'])) { + if ($operator == 'or' && empty($options['reduce_duplicates'])) { if (count($value) > 1) { $operator = 'IN'; } @@ -1120,6 +1096,9 @@ class views_many_to_one_helper { $field = $this->handler->real_field; $clause = $operator == 'or' ? db_or() : db_and(); foreach ($this->handler->table_aliases as $value => $alias) { + if ($operator == 'not') { + $value = NULL; + } $clause->condition("$alias.$field", $value); } diff --git a/profiles/wcm_base/modules/contrib/views/includes/view.inc b/profiles/wcm_base/modules/contrib/views/includes/view.inc index 13e4987f112da5cfb2e1e886b7d80ee747fd18d2..ae6df4c6ae90d6a4ee18217ba3e5df1734d00d42 100644 --- a/profiles/wcm_base/modules/contrib/views/includes/view.inc +++ b/profiles/wcm_base/modules/contrib/views/includes/view.inc @@ -1236,7 +1236,7 @@ class view extends views_db_object { if (!empty($this->build_info['fail'])) { return; } - if (!empty($this->view->build_info['denied'])) { + if (!empty($this->build_info['denied'])) { return; } diff --git a/profiles/wcm_base/modules/contrib/views/plugins/views_plugin_display_feed.inc b/profiles/wcm_base/modules/contrib/views/plugins/views_plugin_display_feed.inc index 07e5bc2fa5b59d6945f2801cf4cc7250dcc41cfd..a3c2333c77bd7956373f483ccd80614d4785d810 100644 --- a/profiles/wcm_base/modules/contrib/views/plugins/views_plugin_display_feed.inc +++ b/profiles/wcm_base/modules/contrib/views/plugins/views_plugin_display_feed.inc @@ -51,6 +51,9 @@ class views_plugin_display_feed extends views_plugin_display_page { */ public function execute() { $output = $this->view->render(); + if (!empty($this->view->build_info['denied'])) { + return MENU_ACCESS_DENIED; + } if (empty($output)) { return MENU_NOT_FOUND; } diff --git a/profiles/wcm_base/modules/contrib/views/tests/views_argument_validator.test b/profiles/wcm_base/modules/contrib/views/tests/views_argument_validator.test index 6e2eedba3e88462044f11a9f2019836e3e135cea..6927584dc3b5ddf72c06af205cfd181f14bcd91d 100644 --- a/profiles/wcm_base/modules/contrib/views/tests/views_argument_validator.test +++ b/profiles/wcm_base/modules/contrib/views/tests/views_argument_validator.test @@ -40,10 +40,27 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { $this->assertTrue($view->argument['null']->validate_arg(12)); } + /** + * Make sure argument validation works properly. + */ + function testArgumentValidatePhpFailure() { + $view = $this->view_test_argument_validate_php_failure(); + $view->save(); + $this->drupalGet('test-php-failure'); + + // This should return a 403, indicating that the arguments validation fails. + $this->assertResponse(403); + + $this->drupalGet('test-php-failure-feed'); + + // This should return a 403, indicating that the arguments validation fails. + $this->assertResponse(403); + } + function view_test_argument_validate_php($string) { $code = 'return $argument == \'' . $string . '\';'; $view = new view(); - $view->name = 'view_argument_validate_numeric'; + $view->name = 'view_argument_validate_php'; $view->description = ''; $view->tag = ''; $view->view_php = ''; @@ -104,4 +121,68 @@ class ViewsArgumentValidatorTest extends ViewsSqlTest { return $view; } + /** + * + * + * @return view $view + * The required view object. + */ + function view_test_argument_validate_php_failure() { + $view = new view(); + $view->name = 'view_argument_validate_php_failure'; + $view->description = ''; + $view->tag = ''; + $view->base_table = 'node'; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_more_always'] = FALSE; + $handler->display->display_options['access']['type'] = 'none'; + $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['pager']['type'] = 'none'; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['row_plugin'] = 'fields'; + /* Field: Content: Title */ + $handler->display->display_options['fields']['title']['id'] = 'title'; + $handler->display->display_options['fields']['title']['table'] = 'node'; + $handler->display->display_options['fields']['title']['field'] = 'title'; + $handler->display->display_options['fields']['title']['label'] = ''; + $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE; + $handler->display->display_options['fields']['title']['link_to_node'] = FALSE; + /* Contextual filter: Global: Null */ + $handler->display->display_options['arguments']['null']['id'] = 'null'; + $handler->display->display_options['arguments']['null']['table'] = 'views'; + $handler->display->display_options['arguments']['null']['field'] = 'null'; + $handler->display->display_options['arguments']['null']['default_action'] = 'default'; + $handler->display->display_options['arguments']['null']['default_argument_type'] = 'fixed'; + $handler->display->display_options['arguments']['null']['default_argument_options']['argument'] = 'No filter'; + $handler->display->display_options['arguments']['null']['summary']['number_of_records'] = '0'; + $handler->display->display_options['arguments']['null']['summary']['format'] = 'default_summary'; + $handler->display->display_options['arguments']['null']['summary_options']['items_per_page'] = '25'; + $handler->display->display_options['arguments']['null']['specify_validation'] = TRUE; + $handler->display->display_options['arguments']['null']['validate']['type'] = 'php'; + $handler->display->display_options['arguments']['null']['validate_options']['code'] = 'return FALSE;'; + $handler->display->display_options['arguments']['null']['validate']['fail'] = 'access denied'; + + /* Display: Page */ + $handler = $view->new_display('page', 'Page', 'page_1'); + $handler->display->display_options['path'] = 'test-php-failure'; + + /* Display: Feed */ + $handler = $view->new_display('feed', 'Feed', 'feed_1'); + $handler->display->display_options['path'] = 'test-php-failure-feed'; + $handler->display->display_options['pager']['type'] = 'none'; + $handler->display->display_options['pager']['options']['offset'] = '0'; + $handler->display->display_options['style_plugin'] = 'rss'; + $handler->display->display_options['row_plugin'] = 'node_rss'; + + return $view; + } + } diff --git a/profiles/wcm_base/modules/contrib/views/tests/views_handler_filter.test b/profiles/wcm_base/modules/contrib/views/tests/views_handler_filter.test new file mode 100644 index 0000000000000000000000000000000000000000..5c1e7cae32768bfd67d48d1d1df2ef09f20d71af --- /dev/null +++ b/profiles/wcm_base/modules/contrib/views/tests/views_handler_filter.test @@ -0,0 +1,161 @@ +<?php + +/** + * @file + * Definition of ViewsHandlerFilterTest. + */ + +/** + * Tests filter handler. + */ +class ViewsHandlerFilterTest extends ViewsSqlTest { + + /** + * {@inheritdoc} + */ + public static function getInfo() { + return array( + 'name' => 'Handler filter test', + 'description' => 'test filter handler definitions', + 'group' => 'Views', + ); + } + + /** + * {@inheritdoc} + */ + protected function setUp() { + // The Views and Views UI modules will be enabled with this. + parent::setUp(); + + // Assign vocabulary 'tag' to user entity. + $field_definition = field_read_field('field_tags'); + $instance_definition = array( + 'field_name' => $field_definition['field_name'], + 'entity_type' => 'user', + 'bundle' => 'user', + 'widget' => array( + 'type' => 'taxonomy_autocomplete', + ), + 'display' => array( + 'default' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + 'teaser' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + ), + ); + field_create_instance($instance_definition); + } + + /** + * Tests "is all of" of filter operation. + */ + function testFilterInOperatorUi() { + $term = $this->drupalCreateTerm(1); + + $node1 = $this->drupalCreateNode(array('type' => 'article','field_tags_tid' => $term->tid, 'created' => REQUEST_TIME)); + $node2 = $this->drupalCreateNode(array('type' => 'article', 'created' => REQUEST_TIME + 1)); + $user2 = $this->drupalCreateUser(array('access content')); + // $this->drupalLogin($this->drupalCreateUser(['administer users']); + $this->drupalLogin($this->drupalCreateUser(['administer users', 'access administration pages', 'administer site configuration', 'administer nodes', 'bypass node access'])); + + $this->drupalGet('node/1/edit'); + $edit['field_tags' . '[' . LANGUAGE_NONE . ']'] = $term->name; + $this->drupalPost('node/' . $node1->nid . '/edit', $edit, t('Save')); + + $edit['field_tags' . '[' . LANGUAGE_NONE . ']'] = $term->name; + $this->drupalPost('user/' . $user2->uid . '/edit', $edit, t('Save')); + + $result[] = array('nid' => $node1->nid); + $view = $this->get_sample_view(); + $this->executeView($view); + $this->assertIdenticalResultset($view, $result); + } + + /** + * Sample view. + * + * @return \view + */ + protected function get_sample_view() { + $view = new view(); + $view->name = 'article'; + $view->description = ''; + $view->tag = 'default'; + $view->base_table = 'node'; + $view->human_name = 'Article'; + $view->core = 7; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['title'] = 'Article'; + $handler->display->display_options['use_more_always'] = FALSE; + $handler->display->display_options['access']['type'] = 'perm'; + $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['pager']['type'] = 'full'; + $handler->display->display_options['pager']['options']['items_per_page'] = '10'; + $handler->display->display_options['style_plugin'] = 'table'; + $handler->display->display_options['style_options']['columns'] = array( + 'title' => 'title', + ); + $handler->display->display_options['style_options']['default'] = '-1'; + $handler->display->display_options['style_options']['info'] = array( + 'title' => array( + 'sortable' => 0, + 'default_sort_order' => 'asc', + 'align' => '', + 'separator' => '', + 'empty_column' => 0, + ), + ); + /* Field: Content: Nid */ + $handler->display->display_options['fields']['nid']['id'] = 'nid'; + $handler->display->display_options['fields']['nid']['table'] = 'node'; + $handler->display->display_options['fields']['nid']['field'] = 'nid'; + $handler->display->display_options['fields']['nid']['label'] = ''; + $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE; + /* Sort criterion: Content: Post date */ + $handler->display->display_options['sorts']['created']['id'] = 'created'; + $handler->display->display_options['sorts']['created']['table'] = 'node'; + $handler->display->display_options['sorts']['created']['field'] = 'created'; + $handler->display->display_options['sorts']['created']['order'] = 'DESC'; + /* Filter criterion: Content: Published */ + $handler->display->display_options['filters']['status']['id'] = 'status'; + $handler->display->display_options['filters']['status']['table'] = 'node'; + $handler->display->display_options['filters']['status']['field'] = 'status'; + $handler->display->display_options['filters']['status']['value'] = 1; + $handler->display->display_options['filters']['status']['group'] = 1; + $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; + /* Filter criterion: Field: Tags (field_tags) */ + $handler->display->display_options['filters']['field_tags_tid']['id'] = 'field_tags_tid'; + $handler->display->display_options['filters']['field_tags_tid']['table'] = 'field_data_field_tags'; + $handler->display->display_options['filters']['field_tags_tid']['field'] = 'field_tags_tid'; + $handler->display->display_options['filters']['field_tags_tid']['operator'] = 'and'; + $handler->display->display_options['filters']['field_tags_tid']['value'] = array( + 0 => '1', + ); + $handler->display->display_options['filters']['field_tags_tid']['expose']['operator_id'] = 'field_tags_tid_op'; + $handler->display->display_options['filters']['field_tags_tid']['expose']['label'] = 'Tags (field_tags)'; + $handler->display->display_options['filters']['field_tags_tid']['expose']['operator'] = 'field_tags_tid_op'; + $handler->display->display_options['filters']['field_tags_tid']['expose']['identifier'] = 'field_tags_tid'; + $handler->display->display_options['filters']['field_tags_tid']['expose']['remember_roles'] = array( + 2 => '2', + ); + $handler->display->display_options['filters']['field_tags_tid']['vocabulary'] = 'tags'; + + /* Display: Page */ + $handler = $view->new_display('page', 'Page', 'page'); + $handler->display->display_options['path'] = 'article'; + + return $view; + } + +} diff --git a/profiles/wcm_base/modules/contrib/views/tests/views_query.test b/profiles/wcm_base/modules/contrib/views/tests/views_query.test index 1146cc05ee55da16a6c21e0285b65b9694206d65..5acf01e958ef158ba229da890baf40b451ce8bfb 100644 --- a/profiles/wcm_base/modules/contrib/views/tests/views_query.test +++ b/profiles/wcm_base/modules/contrib/views/tests/views_query.test @@ -135,6 +135,23 @@ abstract class ViewsTestCase extends DrupalWebTestCase { $this->verbose('<pre>Executed view: ' . ((string) $view->build_info['query']) . '</pre>'); } + /** + * Log in as user 1. + */ + protected function loginUser1() { + $password = user_password(); + // Reset the user 1 password. + $account = user_load(1); + $edit = array( + 'pass' => $password, + ); + $account = user_save($account, $edit); + $account->pass_raw = $password; + + // Log in as user 1. + $this->drupalLogin($account); + } + } /** @@ -167,6 +184,24 @@ abstract class ViewsSqlTest extends ViewsTestCase { $this->checkPermissions(array(), TRUE); } + /** + * Create a term. + * + * @param int $vid + * The vocabulary ID that the term is to be added to. + * + * @return object + * A full term object with a random name. + */ + protected function drupalCreateTerm($vid) { + $term = new stdClass(); + $term->name = $this->randomName(); + $term->description = $this->randomName(); + $term->vid = $vid; + taxonomy_term_save($term); + return $term; + } + /** * This function allows to enable views ui from a higher class which can't * change the setup function anymore. diff --git a/profiles/wcm_base/modules/contrib/views/tests/views_test.info b/profiles/wcm_base/modules/contrib/views/tests/views_test.info index 1b0e8c0100d51fbae988b8be5c07bd8f5b636362..9f089bc2f600d47548e9b1d2aca9c113f36de988 100644 --- a/profiles/wcm_base/modules/contrib/views/tests/views_test.info +++ b/profiles/wcm_base/modules/contrib/views/tests/views_test.info @@ -5,8 +5,8 @@ core = 7.x dependencies[] = views hidden = TRUE -; Information added by Drupal.org packaging script on 2018-04-14 -version = "7.x-3.20" +; Information added by Drupal.org packaging script on 2019-03-13 +version = "7.x-3.21" core = "7.x" project = "views" -datestamp = "1523668093" +datestamp = "1552486703" diff --git a/profiles/wcm_base/modules/contrib/views/views.info b/profiles/wcm_base/modules/contrib/views/views.info index 1dd74a50c24088a2e6b12509f61dc7b483322284..6f311f9a4f6ccb08e8144e061246dc65c4e416f6 100644 --- a/profiles/wcm_base/modules/contrib/views/views.info +++ b/profiles/wcm_base/modules/contrib/views/views.info @@ -308,6 +308,7 @@ files[] = tests/views_exposed_form.test files[] = tests/field/views_fieldapi.test files[] = tests/views_glossary.test files[] = tests/views_groupby.test +files[] = tests/views_handler_filter.test files[] = tests/views_handlers.test files[] = tests/views_module.test files[] = tests/views_pager.test @@ -328,8 +329,8 @@ files[] = tests/views_cache.test files[] = tests/views_view.test files[] = tests/views_ui.test -; Information added by Drupal.org packaging script on 2018-04-14 -version = "7.x-3.20" +; Information added by Drupal.org packaging script on 2019-03-13 +version = "7.x-3.21" core = "7.x" project = "views" -datestamp = "1523668093" +datestamp = "1552486703" diff --git a/profiles/wcm_base/modules/contrib/views/views_ui.info b/profiles/wcm_base/modules/contrib/views/views_ui.info index addebb2b2e13509f9e8c6f13875107afa59dba06..dc079b1173f3f694a2e1d4c4736de74e32bf299e 100644 --- a/profiles/wcm_base/modules/contrib/views/views_ui.info +++ b/profiles/wcm_base/modules/contrib/views/views_ui.info @@ -8,8 +8,8 @@ dependencies[] = views files[] = views_ui.module files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php -; Information added by Drupal.org packaging script on 2018-04-14 -version = "7.x-3.20" +; Information added by Drupal.org packaging script on 2019-03-13 +version = "7.x-3.21" core = "7.x" project = "views" -datestamp = "1523668093" +datestamp = "1552486703" diff --git a/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/.gitignore b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..722d5e71d93ca0aa0db6fd22452e46be5604a84d --- /dev/null +++ b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/.gitignore @@ -0,0 +1 @@ +.vscode diff --git a/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.module b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.module index dc9266dbc4f940fb7e81107c215ba3018df24b7b..6ab8180ab160f500417c3d691f2432ca8b8c48e8 100644 --- a/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.module +++ b/profiles/wcm_base/modules/custom/ocio_simplesamlphp_auth/ocio_simplesamlphp_auth.module @@ -147,7 +147,7 @@ function ocio_simplesamlphp_auth_form_simplesamlphp_auth_settings_alter(&$form, $path_note = ''; if ($pantheon_environment) { $envPath = _ocio_simplesamlphp_auth_get_env_path(); - $path_note = '</br>Pantheon environment detected (' . $pantheon_environment . '). ' . $envPath . ' will be prepended to your path.'; + $path_note = 'Pantheon environment detected (' . $pantheon_environment . '). ' . $envPath . ' will be prepended to your path.'; } // Hide the automatic role population section to avoid conflicts. @@ -624,14 +624,6 @@ function ocio_simplesamlphp_auth_init() { if (current_path() == 'user/login' || current_path() == 'saml_login') { $metaExpire = _ocio_simplesamlphp_auth_get_metadata_expire(); if (time() > $metaExpire) { - $msg = t( - 'Expired metadata detected. Expires: @expire. Current: @current. Refreshing.', - array( - '@expire' => date('Y-m-d h:i:s a', $metaExpire), - '@current' => date('Y-m-d h:i:s a', time()), - ) - ); - watchdog('ocio_simplesamlphp_auth', $msg); _ocio_simplesamlphp_auth_refresh_metadata(); } } @@ -817,7 +809,16 @@ function _ocio_simplesamlphp_auth_refresh_metadata($httpOptions = array()) { * Reads the expire date from the current metadata. */ function _ocio_simplesamlphp_auth_get_metadata_expire() { - $metaPath = variable_get('ocio_simplesamlphp_auth_metadata_path', '/files/private/simplesamlphp/metadata/'); + // Get the path to metadata from the parameters file. + $parametersFile = DRUPAL_ROOT . '/private/simplesaml_config/parameters.php'; + if (file_exists($parametersFile)) { + require $parametersFile; + $metaPath = $metadataDir; + } + // No parameters file. Attempt to use the module var. + else { + $metaPath = variable_get('ocio_simplesamlphp_auth_metadata_path', '/files/private/simplesamlphp/metadata/'); + } $metaFile = $metaPath . 'shib13-idp-remote.php'; include_once $metaFile; return $metadata['urn:mace:incommon:osu.edu']['expire']; diff --git a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.defaultconfig.inc b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.defaultconfig.inc index 15c709f749a3c1bce67bab0e62c4a3af72f4494e..52613bd0cb34f889c7525e26b9b37d451186f676 100644 --- a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.defaultconfig.inc +++ b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.defaultconfig.inc @@ -1,4 +1,5 @@ <?php + /** * @file * smtp_html_mail.features.defaultconfig.inc @@ -28,5 +29,12 @@ function smtp_html_mail_defaultconfig_strongarm() { $strongarm->value = 'full_html'; $export['mimemail_format'] = $strongarm; + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'smtp_timeout'; + $strongarm->value = '30'; + $export['smtp_timeout'] = $strongarm; + return $export; } diff --git a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.filter.inc b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.filter.inc index 3fc674a6dc5f8049adb77d0bbfbe85a2ffaed787..57bc79bdb5db57f4aeb610b8a4381e0dd3db251b 100644 --- a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.filter.inc +++ b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.filter.inc @@ -1,4 +1,5 @@ <?php + /** * @file * smtp_html_mail.features.filter.inc diff --git a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.inc b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.inc index c7c58dbdb15d23064e2284dee07ca51ded79b228..3bb09c09fce84bd4b782e91f8eaedf8de332eb2b 100644 --- a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.inc +++ b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.features.inc @@ -1,4 +1,5 @@ <?php + /** * @file * smtp_html_mail.features.inc diff --git a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.info b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.info index c346b36da87d5a8f014daf165022717a269ef2c2..bba3a845ed17de29c9c9937bb8d07587c723d985 100644 --- a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.info +++ b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.info @@ -2,7 +2,7 @@ name = Smtp Html Mail description = Feature to configure smtp and html mail settings to use with an OSU service email account. core = 7.x package = OCIO Configuration -version = 7.x-1.1 +version = 7.x-1.0-beta1 dependencies[] = ctools dependencies[] = defaultconfig dependencies[] = features @@ -13,6 +13,7 @@ dependencies[] = strongarm dependencies[] = token_filter features[ctools][] = strongarm:strongarm:1 features[defaultconfig][] = strongarm:mimemail_format +features[defaultconfig][] = strongarm:smtp_timeout features[features_api][] = api:2 features[filter][] = full_html features[variable][] = mail_system diff --git a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.strongarm.inc b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.strongarm.inc index 69118ef0cc9c41d5139fba21eb5752076a3ea8a7..caa938b4fcf26f373951bc741543447d2a61cc8c 100644 --- a/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.strongarm.inc +++ b/profiles/wcm_base/modules/custom/smtp_html_mail/smtp_html_mail.strongarm.inc @@ -1,4 +1,5 @@ <?php + /** * @file * smtp_html_mail.strongarm.inc diff --git a/profiles/wcm_base/wcm_base.make b/profiles/wcm_base/wcm_base.make index eb08ff0d21b7ca69a65514bf7396b06fda996d64..f5288d9651b191e454353722218bba9baac30305 100644 --- a/profiles/wcm_base/wcm_base.make +++ b/profiles/wcm_base/wcm_base.make @@ -169,6 +169,7 @@ projects[smtp][version] = 1.7 projects[smtp][subdir] = contrib projects[smtp][patch][2966816] = https://www.drupal.org/files/issues/2018-11-13/smtp-filepath_uri-2966816-27-D7_0.patch projects[smtp][patch][2753115] = https://www.drupal.org/files/issues/2018-06-04/2753115-41-smtp-multiple-to-addresses-error.patch +projects[smtp][patch][2781157] = https://www.drupal.org/files/issues/smtp-make_smtp_timeout_configurable-2781157-1.patch projects[special_menu_items][version] = 2.0 projects[special_menu_items][subdir] = contrib @@ -185,7 +186,7 @@ projects[token][subdir] = contrib projects[token_filter][version] = 1.1 projects[token_filter][subdir] = contrib -projects[views][version] = 3.20 +projects[views][version] = 3.21 projects[views][subdir] = contrib projects[views][patch][2985178] = http://drupal.org/files/issues/2018-07-15/mysql-group-by-duplication-workaround-2985178-7.patch projects[views][patch][2037469] = http://drupal.org/files/issues/views-exposed-sorts-2037469-26.patch