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

@@ -28,6 +28,20 @@ function uuid_token_info() {
return $tokens;
}
/**
* Implements hook_token_info_alter().
*/
function uuid_token_info_alter(&$data) {
foreach (entity_get_info() as $entity_type => $info) {
if (isset($info['uuid']) && $info['uuid'] == TRUE && !empty($info['entity keys']['uuid'])) {
$token_type = !empty($info['token type']) ? $info['token type'] : $entity_type;
if (empty($data['types'][$token_type])) {
unset($data['tokens'][$token_type]);
}
}
}
}
/**
* Implements hook_tokens().
*/