Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
62718444
Commit
62718444
authored
13 years ago
by
Dave Reid
Browse files
Options
Downloads
Patches
Plain Diff
Fixed possible XSS with field labels in Feed importer mapping settings.
parent
6f94dcc1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
mappers/date.inc
+3
-4
3 additions, 4 deletions
mappers/date.inc
mappers/field.inc
+1
-1
1 addition, 1 deletion
mappers/field.inc
mappers/file.inc
+1
-1
1 addition, 1 deletion
mappers/file.inc
mappers/link.inc
+2
-2
2 additions, 2 deletions
mappers/link.inc
mappers/taxonomy.inc
+1
-1
1 addition, 1 deletion
mappers/taxonomy.inc
with
8 additions
and
9 deletions
mappers/date.inc
+
3
−
4
View file @
62718444
...
...
@@ -17,14 +17,13 @@ function date_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
$info
=
field_info_field
(
$name
);
if
(
in_array
(
$info
[
'type'
],
array
(
'date'
,
'datestamp'
,
'datetime'
)))
{
$targets
[
$name
.
':start'
]
=
array
(
'name'
=>
$instance
[
'label'
]
.
': Start'
,
'name'
=>
t
(
'@name: Start'
,
array
(
'@name'
=>
$instance
[
'label'
]
))
,
'callback'
=>
'date_feeds_set_target'
,
'description'
=>
t
(
'The start date for the @name field. Also use if mapping both start and end.'
,
array
(
'@name'
=>
$instance
[
'label'
])),
'description'
=>
t
(
'The start date for the @name field. Also use if mapping both start and end.'
,
array
(
'@name'
=>
$instance
[
'label'
])),
'real_target'
=>
$name
,
);
$targets
[
$name
.
':end'
]
=
array
(
'name'
=>
$instance
[
'label'
]
.
': End'
,
'name'
=>
t
(
'@name: End'
,
array
(
'@name'
=>
$instance
[
'label'
]
))
,
'callback'
=>
'date_feeds_set_target'
,
'description'
=>
t
(
'The end date for the @name field.'
,
array
(
'@name'
=>
$instance
[
'label'
])),
'real_target'
=>
$name
,
...
...
This diff is collapsed.
Click to expand it.
mappers/field.inc
+
1
−
1
View file @
62718444
...
...
@@ -40,7 +40,7 @@ function field_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_na
}
if
(
isset
(
$callback
))
{
$targets
[
$name
]
=
array
(
'name'
=>
$instance
[
'label'
],
'name'
=>
check_plain
(
$instance
[
'label'
]
)
,
'callback'
=>
$callback
,
'description'
=>
t
(
'The @label field of the node.'
,
array
(
'@label'
=>
$instance
[
'label'
])),
);
...
...
This diff is collapsed.
Click to expand it.
mappers/file.inc
+
1
−
1
View file @
62718444
...
...
@@ -21,7 +21,7 @@ function file_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
if
(
in_array
(
$info
[
'type'
],
array
(
'file'
,
'image'
)))
{
$targets
[
$name
]
=
array
(
'name'
=>
$instance
[
'label'
],
'name'
=>
check_plain
(
$instance
[
'label'
]
)
,
'callback'
=>
'file_feeds_set_target'
,
'description'
=>
t
(
'The @label field of the node.'
,
array
(
'@label'
=>
$instance
[
'label'
])),
);
...
...
This diff is collapsed.
Click to expand it.
mappers/link.inc
+
2
−
2
View file @
62718444
...
...
@@ -16,14 +16,14 @@ function link_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
if
(
$info
[
'type'
]
==
'link_field'
)
{
if
(
array_key_exists
(
'url'
,
$info
[
'columns'
]))
{
$targets
[
$name
.
':url'
]
=
array
(
'name'
=>
$instance
[
'label'
]
.
' URL'
,
'name'
=>
t
(
'@name URL'
,
array
(
'@name'
=>
$instance
[
'label'
]
))
,
'callback'
=>
'link_feeds_set_target'
,
'description'
=>
t
(
'The @label field of the node.'
,
array
(
'@label'
=>
$instance
[
'label'
])),
);
}
if
(
array_key_exists
(
'title'
,
$info
[
'columns'
]))
{
$targets
[
$name
.
':title'
]
=
array
(
'name'
=>
$instance
[
'label'
]
.
' Title'
,
'name'
=>
t
(
'@name Title'
,
array
(
'@name'
=>
$instance
[
'label'
]
))
,
'callback'
=>
'link_feeds_set_target'
,
'description'
=>
t
(
'The @label field of the node.'
,
array
(
'@label'
=>
$instance
[
'label'
])),
);
...
...
This diff is collapsed.
Click to expand it.
mappers/taxonomy.inc
+
1
−
1
View file @
62718444
...
...
@@ -48,7 +48,7 @@ function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $bundle
$info
=
field_info_field
(
$name
);
if
(
$info
[
'type'
]
==
'taxonomy_term_reference'
)
{
$targets
[
$name
]
=
array
(
'name'
=>
$instance
[
'label'
],
'name'
=>
check_plain
(
$instance
[
'label'
]
)
,
'callback'
=>
'taxonomy_feeds_set_target'
,
'description'
=>
t
(
'The @label field of the node.'
,
array
(
'@label'
=>
$instance
[
'label'
])),
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment