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
073c66a2
Commit
073c66a2
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
#755556 Clarify why only files in site's files directory are valid.
parent
f57e9563
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/FeedsFileFetcher.inc
+3
-0
3 additions, 0 deletions
plugins/FeedsFileFetcher.inc
with
3 additions
and
0 deletions
plugins/FeedsFileFetcher.inc
+
3
−
0
View file @
073c66a2
...
@@ -85,6 +85,9 @@ class FeedsFileFetcher extends FeedsFetcher {
...
@@ -85,6 +85,9 @@ class FeedsFileFetcher extends FeedsFetcher {
elseif
(
empty
(
$values
[
'source'
]))
{
elseif
(
empty
(
$values
[
'source'
]))
{
form_set_error
(
'feeds][source'
,
t
(
'Upload a file first.'
));
form_set_error
(
'feeds][source'
,
t
(
'Upload a file first.'
));
}
}
// If a file has not been uploaded and $values['source'] is not empty, make
// sure that this file is within Drupal's files directory as otherwise
// potentially any file that the web server has access could be exposed.
elseif
(
!
file_check_location
(
$values
[
'source'
],
file_directory_path
()))
{
elseif
(
!
file_check_location
(
$values
[
'source'
],
file_directory_path
()))
{
form_set_error
(
'feeds][source'
,
t
(
'File needs to point to a file in your Drupal file system path.'
));
form_set_error
(
'feeds][source'
,
t
(
'File needs to point to a file in your Drupal file system path.'
));
}
}
...
...
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