? boost-620648.patch Index: boost.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.install,v retrieving revision 1.2.2.1.2.3.2.69 diff -u -p -r1.2.2.1.2.3.2.69 boost.install --- boost.install 2 Nov 2009 10:56:42 -0000 1.2.2.1.2.3.2.69 +++ boost.install 2 Nov 2009 11:54:02 -0000 @@ -90,6 +90,8 @@ function boost_requirements($phase) { $crawler_response = drupal_http_request(BOOST_CRAWLER_SELF . '&test=1'); $crawler_response = $crawler_response->code; } + $robots = file_exists('robots.txt') ? file_get_contents('robots.txt') : FALSE; + foreach ($cache_directories as $cache_directory) { _boost_mkdir_p($cache_directory); $root_file = file_put_contents($cache_directory . '/' . variable_get('boost_root_file', '.boost'), $cache_directory); @@ -220,6 +222,14 @@ function boost_requirements($phase) { 'value' => $t('File system sub directory limit.'), ); } + if ($robots && !stristr($robots, 'Disallow: /boost_stats.php')) { + $requirements['boost_robots'] = array( + 'title' => $t('Boost'), + 'description' => $t('Your robots.txt file does not contain "Disallow: /boost_stats.php". This is needed inorder to prevent the output of this from accendently getting indexed by search engines.'), + 'severity' => REQUIREMENT_WARNING, + 'value' => $t('"Disallow: /boost_stats.php" entry missing in robots.txt'), + ); + } if (empty($requirements)) { $requirements['boost'] = array( 'title' => $t('Boost'), Index: stats/boost_stats.ajax.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/stats/Attic/boost_stats.ajax.inc,v retrieving revision 1.1.2.6 diff -u -p -r1.1.2.6 boost_stats.ajax.inc --- stats/boost_stats.ajax.inc 4 Oct 2009 07:18:41 -0000 1.1.2.6 +++ stats/boost_stats.ajax.inc 2 Nov 2009 11:54:02 -0000 @@ -21,7 +21,7 @@ function boost_stats_ajax_callback() { && !isset($_GET['qq']) && !isset($_GET['referer']) ) { - exit; + return drupal_not_found(); } // Set variables passed via GET. @@ -68,7 +68,7 @@ function boost_stats_ajax_callback() { // Send JSON Back if (!empty($json)) { - echo drupal_json($json); + drupal_json($json); } } // Send HTML back Index: stats/boost_stats.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/stats/Attic/boost_stats.php,v retrieving revision 1.1.2.13 diff -u -p -r1.1.2.13 boost_stats.php --- stats/boost_stats.php 21 Oct 2009 19:57:38 -0000 1.1.2.13 +++ stats/boost_stats.php 2 Nov 2009 11:54:02 -0000 @@ -17,6 +17,7 @@ if ( !isset($_GET['nid']) && !isset($_GET['qq']) && !isset($_GET['referer']) ) { + drupal_not_found(); exit; } @@ -41,8 +42,7 @@ if (isset($_GET['js'])) { // Send JSON Back if (!empty($json)) { - header('Content-Type: text/javascript; charset=utf-8'); - echo json_encode($json); + drupal_json($json); } } // Send HTML back