Issue #1760330 by s.Daniel, David_Rothstein, jfhovinne: Hide vulnerable drupal install.php sites from search engines.
parent
aa6235c3c3
commit
cb7127c514
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
Drupal 7.25, xxxx-xx-xx (development version)
|
Drupal 7.25, xxxx-xx-xx (development version)
|
||||||
-----------------------
|
-----------------------
|
||||||
|
- Added a meta tag to install.php to prevent it from being indexed by search
|
||||||
|
engines even when Drupal is installed in a subfolder (minor markup change).
|
||||||
- Fixed a bug in the database API that caused frequent deadlock errors when
|
- Fixed a bug in the database API that caused frequent deadlock errors when
|
||||||
running merge queries on some servers.
|
running merge queries on some servers.
|
||||||
- Performance improvement: Prevent block rehashing from writing blocks to the
|
- Performance improvement: Prevent block rehashing from writing blocks to the
|
||||||
|
|
|
@ -692,6 +692,21 @@ function install_full_redirect_url($install_state) {
|
||||||
*/
|
*/
|
||||||
function install_display_output($output, $install_state) {
|
function install_display_output($output, $install_state) {
|
||||||
drupal_page_header();
|
drupal_page_header();
|
||||||
|
|
||||||
|
// Prevent install.php from being indexed when installed in a sub folder.
|
||||||
|
// robots.txt rules are not read if the site is within domain.com/subfolder
|
||||||
|
// resulting in /subfolder/install.php being found through search engines.
|
||||||
|
// When settings.php is writeable this can be used via an external database
|
||||||
|
// leading a malicious user to gain php access to the server.
|
||||||
|
$noindex_meta_tag = array(
|
||||||
|
'#tag' => 'meta',
|
||||||
|
'#attributes' => array(
|
||||||
|
'name' => 'robots',
|
||||||
|
'content' => 'noindex, nofollow',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
drupal_add_html_head($noindex_meta_tag, 'install_meta_robots');
|
||||||
|
|
||||||
// Only show the task list if there is an active task; otherwise, the page
|
// Only show the task list if there is an active task; otherwise, the page
|
||||||
// request has ended before tasks have even been started, so there is nothing
|
// request has ended before tasks have even been started, so there is nothing
|
||||||
// meaningful to show.
|
// meaningful to show.
|
||||||
|
|
Loading…
Reference in New Issue