4

I have just set up a new Drupal site, community based. there are some forums which contain 'sensitive' info, yet incredibly, Drupal auto generates RSS feeds for taxonomy terms, which is what the forum is based on.

There's no built in way to turn it off! Or a module to control what feeds are generated... this is a big problem.

Using Drupal 6.14. I dont want to hack core but if anyone knows a way to deal with this... that would be great

Thanks

1
  • Does not belong on serverfault, removed the tag. Commented Oct 25, 2009 at 1:51

5 Answers 5

6

You could try a hook_menu call in a custom module that takes over the sensitive URLs and serves a blank page or error message. Turning them off should be in core, and a Google search shows a lot of grumpy people over the issue.

Sign up to request clarification or add additional context in comments.

1 Comment

hook_menu_alter, and 'page callback' or 'access callback' for each RSS path set to FALSE.
5

If you are using the Views module, you could enable the taxonomy_term override it offers and edit the two feed displays it provides, adjusting them to work only for certain vocabularies, or even force a 404 for any request.

Note that this would just be a variation of ceejayoz' (correct) suggestion, as the view would 'take over' the feed URLs and serve something differently for them.

1 Comment

I prefer this solution, as a secured but useful middle ground.
4

There's a Drupal module now, that does that: RSS Permissions. Here is an excerpt from its project page:

Set role-based permission settings for blog, taxonomy, aggregator, and main site's RSS feeds. This module does not disable RSS feeds altogether: RSS feeds created through the Views module and others not listed here do not have associated permissions.

RSS permissions module lets you disable some or all RSS feeds based on different user roles,

1 Comment

Patched something together with .htaccess in the end (as I remember) but was a poor fix - thank you posting this, module solution will be much better.
1

You could extend the list of values of "options" in the form section in system_rss_feeds_settings function in system.admin.inc - add '0' as a value in the array. This will then expose 0 as a value of "Number of items in each feed", thereby suppressing the RSS feed generation.

1 Comment

Thanks for your reply - as phpdiva above posted, there's now thankfully a module to make this easier :)
1

This works in a custom module. It will remove the page and also the link in the HTML for the page, this is for D7. Make sure you flush your caches.

function MYMODULE_menu_alter(&$items) { $items['rss.xml']['page callback'] = 'drupal_not_found'; } function MYMODULE_html_head_alter(&$head_elements) { foreach ($head_elements as $key => $v) { if (strstr($key, 'rss.xml')) { unset($head_elements[$key]); } } } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.