security update for uuid xmlsitemap file_field_path

This commit is contained in:
2018-10-13 16:01:24 +02:00
parent f7ae17e6c4
commit a163542966
109 changed files with 5458 additions and 1952 deletions

View File

@@ -0,0 +1,82 @@
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
The XML sitemap user module, part of the XML sitemap
(https://www.drupal.org/project/xmlsitemap) package, adds user profiles to the
site map. The XML sitemap module creates a sitemap that conforms to the
sitemaps.org specification. This helps search engines to more intelligently
crawl a website and keep their results up to date.
* For a full description of the module visit
https://www.drupal.org/documentation/modules/xmlsitemap
* To submit bug reports and feature suggestions, or to track changes visit
https://www.drupal.org/project/issues/xmlsitemap
REQUIREMENTS
------------
This module requires the following module:
* XML sitemap - https://www.drupal.org/project/xmlsitemap
RECOMMENDED MODULES
-------------------
* Ctools - https://www.drupal.org/project/ctools
* RobotsTxt - https://www.drupal.org/project/robotstxt
* Site Verification - https://www.drupal.org/project/site_verify
* Browscap - https://www.drupal.org/project/browscap
* Vertical Tabs - https://www.drupal.org/project/vertical_tabs
INSTALLATION
------------
This is a submodule of the XML sitemap module. Install the XML sitemap module as
you would normally install a contributed Drupal module. Visit
https://www.drupal.org/node/895232 for further information.
CONFIGURATION
-------------
1. Install the XML sitemap module.
2. Enable the XML sitemap module.
3. To include users in the sitemap, enable the XML sitemap user submodule.
4. To add individuals user to the site map navigate to Administration > People
and select edit on the user to be included in the sitemap.
5. Select the XML sitemap fieldset.
6. Under "Inclusion" change "Excluded" to become "Included". Save.
7. Once that is complete, navigate to Configurations > Search and Metadata > XML
Sitemap.
8. Select the Rebuild Links tab in the upper right.
9. Select "Rebuild sitemap" even if the message says that you do not need to.
10. Now you're taken back to the config page which shows you the link to your
XML sitemap which you can select and confirm that pages have been added.
TROUBLESHOOTING
---------------
In order to list user profiles in the site map, the anonymous user must have the
View user profiles permission.
MAINTAINERS
-----------
* Andrei Mateescu (amateescu) - https://www.drupal.org/u/amateescu
* Dave Reid - https://www.drupal.org/u/dave-reid
* Juampy NR (juampynr) - https://www.drupal.org/u/juampynr
* Tasya Rukmana (tadityar) - https://www.drupal.org/u/tadityar

View File

@@ -3,13 +3,10 @@ description = Adds user profile links to the sitemap.
package = XML sitemap
dependencies[] = xmlsitemap
core = 7.x
files[] = xmlsitemap_user.module
files[] = xmlsitemap_user.install
files[] = xmlsitemap_user.test
; Information added by Drupal.org packaging script on 2016-05-25
version = "7.x-2.3"
; Information added by Drupal.org packaging script on 2018-10-09
version = "7.x-2.6"
core = "7.x"
project = "xmlsitemap"
datestamp = "1464191061"
datestamp = "1539120486"

View File

@@ -1,5 +1,10 @@
<?php
/**
* @file
* Default file for XML sitemap user.
*/
/**
* Implements hook_entity_info_alter().
*/
@@ -30,7 +35,7 @@ function xmlsitemap_user_xmlsitemap_index_links($limit) {
/**
* Process user sitemap links.
*
* @param $uids
* @param array $uids
* An array of user IDs.
*/
function xmlsitemap_user_xmlsitemap_process_user_links(array $uids) {
@@ -120,7 +125,7 @@ function xmlsitemap_user_form_user_admin_settings_alter(&$form, $form_state) {
*
* The link will be saved as $account->xmlsitemap.
*
* @param $account
* @param object $account
* A user object.
*/
function xmlsitemap_user_create_link(stdClass &$account) {
@@ -155,7 +160,7 @@ function xmlsitemap_user_create_link(stdClass &$account) {
}
/**
* Implementation of hook_variables().
* Implements hook_variables().
*/
function xmlsitemap_user_variables() {
$defaults = array();

View File

@@ -5,10 +5,32 @@
* Unit tests for the xmlsitemap_user module.
*/
/**
* Tests for User Functional.
*/
class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
/**
* Normal User.
*
* @var string
*
* @codingStandardsIgnoreStart
*/
protected $normal_user;
/**
* Accounts.
*
* @var array
*/
protected $accounts = array();
/**
* Get Info.
*
* @codingStandardsIgnoreEnd
*/
public static function getInfo() {
return array(
'name' => 'XML sitemap user',
@@ -17,15 +39,23 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
);
}
function setUp($modules = array()) {
/**
* Setup.
*/
public function setUp($modules = array()) {
$modules[] = 'xmlsitemap_user';
parent::setUp($modules);
// Save the user settings before creating the users.
xmlsitemap_link_bundle_settings_save('user', 'user', array('status' => 1, 'priority' => 0.5));
// Create the users
$this->admin_user = $this->drupalCreateUser(array('administer users', 'administer permissions', 'administer xmlsitemap'));
// Create the users.
$this->admin_user = $this->drupalCreateUser(array(
'administer users',
'administer permissions',
'administer xmlsitemap',
));
$this->normal_user = $this->drupalCreateUser(array('access content'));
// Update the normal user to make its sitemap link visible.
@@ -33,7 +63,10 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
user_save($account, array('access' => 1, 'login' => 1));
}
function testBlockedUser() {
/**
* Blocked User().
*/
public function testBlockedUser() {
$this->drupalLogin($this->admin_user);
$this->assertSitemapLinkVisible('user', $this->normal_user->uid);
@@ -42,9 +75,10 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
'status' => 0,
);
// This will pass when http://drupal.org/node/360925 is fixed.
// This will pass when https://www.drupal.org/node/360925 is fixed.
$this->drupalPost('user/' . $this->normal_user->uid . '/edit', $edit, t('Save'));
$this->assertText('The changes have been saved.');
$this->assertSitemapLinkNotVisible('user', $this->normal_user->uid);
}
}