Sorry for this request: i have this output and i don't understand why - i use pathauto.
How to solve?

The default /node page created by Drupal core is still enabled. With improper setup of node types, this can reveal sensitive information (e.g. using the profile module with automatic publish to front activiated)!

many thanks!

CommentFileSizeAuthor
Is/node available? --- Security risk!24.71 KBbardill
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malc0mn’s picture

Status: Active » Closed (duplicate)
bardill’s picture

Many thanks malc0mn - but it's impossible to understand.
How to solve this check? What is the settings?
Many thanks. b

malc0mn’s picture

Component: Documentation » Code
Assigned: Unassigned » malc0mn
Category: support » bug
Status: Closed (duplicate) » Needs work

This error might not be relevant to you at all. If you have created a custom homepage and set it to be the default homepage in /admin/settings/site-information (all the way at the bottom) then it is relevant.

The solution is simply to unset the standard 'node' page using a hook_menu_alter() and the warning will go away.

In writing this response, I'm reopening the issue and marking it as a bug, as I should add an additional check before issuing this security alert:

  function _prod_check_node_available() {
    [...]
    $result = MENU_NOT_FOUND;
    $frontpage = variable_get('site_frontpage', '');
    if (!empty($frontpage) && $frontpage != 'node') {
      $result = menu_execute_active_handler('node');
    }
    switch ($result) {
      [...]
    }
    [...]
  }

Since it is not an issue when actually using the default /node homepage.

Or maybe better avoid running the check alltogether if the default /node page is actually used? Not sure yet though:

  function _prod_check_functions() {
    [...]
    $frontpage = variable_get('site_frontpage', '');
    if (!empty($frontpage) && $frontpage != 'node') {
      $functions['security']['_prod_check_node_available'] = 'Is /node available?';
    }
    [...]
  }

In short: check /admin/settings/site-information (I assume you're on D6, given the issue state) and see if the Default front page field is empty or set to 'node'. If that is the case, then you can ignore the warning

bardill’s picture

Many thanks for your time malc0mn. Great!
In /admin/settings/site-information my Default front page field is set with a views path: news
Can i ignore the warning?

Many thanks.
b

malc0mn’s picture

No, then you should implement the hook_menu_alter() to unset() the /node path.

malc0mn’s picture

Status: Needs work » Fixed

Applied to all branches. Used a different approach though.

bardill’s picture

Many thanks for your continued work.

Status: Fixed » Closed (fixed)

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

OnkelTem’s picture

Status: Closed (fixed) » Active

If this is so common case why not to provide this override in production check module and make it customizable on prod check settings page?
Also is this applies to Drupal 7 or there is another way to "turn off" /node page? If yes, can I change version of this issue to 7.x?

OnkelTem’s picture

Priority: Minor » Normal

An attempt to draw more attention! :)

malc0mn’s picture

Status: Active » Closed (won't fix)

I thought about integrating this in prod_check, but however silly and small it is, it really has no place in this module. This would open the door to adding other stuff like this to prod_check, while prod_check's only task is to perform checks and inform you about the status of your setup. That's it :)

Just add the hook to one of your custom modules:

function mymodule_menu_alter(&$items) {
  $items['node']['access callback'] = FALSE;
}

or even better in my opinion:

function mymodule_menu_alter(&$items) {
  unset($items['node']);
}

Clear the cache and you're good to go.

OnkelTem’s picture

@malc0mn

Thank you for quick reply and the proposed solution!

OnkelTem’s picture

I created simple module for Drupal 7 which disables 'node' page when it's not a site's frontpage:

http://drupal.org/sandbox/onkeltem/1805684

malc0mn’s picture

See first comment in this thread :-D

OnkelTem’s picture

@malc0mn

Lol :)