Comments

aron novak’s picture

Status: Active » Needs review
killes@www.drop.org’s picture

That patch should maybe be a changed to extend the description for the form field. Not sure what to write, though.

killes@www.drop.org’s picture

StatusFileSize
new2.22 KB

Here's a patch which also allows this for the drush integration.

aron novak’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.06 KB

#3: great, drush integration is also an important part of the module ;)

I extended it with an explanation in the description of URL field.
It's RTBC from my point of view. Do you agree?

killes@www.drop.org’s picture

StatusFileSize
new2.67 KB

The English help text seemed a bit strange, I've updated it to something that I believe to be better.

aron novak’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for cooperating on this! (and also for the language improvements!)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

killes@www.drop.org’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.88 KB

Since the usage of local files is possibly a security issue, we should have a special permission for them, see patch. We should add a remark in the README as well, but I am not sure where you want to place that.

aron novak’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new837 bytes

If you also like the text of the README, it's RTBC.

alex_b’s picture

Status: Reviewed & tested by the community » Needs work

I know we have talked about this before, but revisiting this, I start thinking that we should limit possible files to the site's files directory. Killes: would this address your use case?

Addressing this issue remains critical. We can't roll a release without fixing this.

If we go down the proposed extra permission route, we should:

#8: rename 'allow local files as feeds' to 'use local files as feeds' - makes more sense from a role point of view.

#9: adjust README text accoringly.

aron novak’s picture

There is a problem with the form approach, node/add/feed and drush is not the only point where the user can enter feed URL. There is a block as well.

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new2.44 KB

Attached a new patch, simplified form validating is included, restricted to the files/ directory.
drush create command is not a problem, if someone has shell access, it's not a problem if he can use local file urls in a non-restricted way

aron novak’s picture

README update conflicts w/ #500856: Clean up and improve README, so i added the notes there.

alex_b’s picture

Status: Needs review » Needs work

Just talked to Jose Reyero.

He pointed me at:

http://api.drupal.org/api/function/file_check_location/6

We should use that instead of doing our own check.

He also suggested to make the directory configurable, so that you can point it to any other directory if necessary. I think we could add this functionality after this patch has been committed, especially if killes is fine with the limitation of the drupal files directory.

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new2.44 KB

Now it uses file_check_location

alex_b’s picture

Status: Needs review » Needs work
strpos($form_state['values']['feedapi']['feedapi_url'], 'file://') !== FALSE

Should be:

strpos($form_state['values']['feedapi']['feedapi_url'], 'file://') === 0

To make sure that file:// is really at the beginning of the string.

Similarly, let's use substr() instead of str_replace() to replace the first 7 characters that compose file://

str_replace('file://', '', $form_state['values']['feedapi']['feedapi_url'])
alex_b’s picture

Status: Needs work » Needs review
StatusFileSize
new2.39 KB

Incorporated suggestions from #16

aron novak’s picture

Status: Needs review » Reviewed & tested by the community
alex_b’s picture

Assigned: aron novak » Unassigned
Status: Reviewed & tested by the community » Fixed

In the face of the fact that we need to roll a FeedAPI release ASAP (#580508: FeedAPI doesnt update on cron run after drupal 6.14 upgrade) I have committed this now.

I know that this patch may be a little too tight for what killes is trying to do. If so, let's deal with the limitations in a separate follow up issue. Setting to fixed.

Thank you everybody.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.