--- modules/drupal/drupal.module	2007-01-24 15:48:36.000000000 +0100
+++ modules/drupal/drupal.module	2007-02-10 09:55:19.000000000 +0100
@@ -77,6 +77,14 @@ function drupal_sites_registry_settings(
     '#default_value' => variable_get('drupal_server', 'http://drupal.org/xmlrpc.php'),
     '#description' => t('The URL of the Drupal XML-RPC server you wish to register with.')
   );
+  $form['drupal_password'] =  array(
+    '#type' => 'password',
+    '#title' => t('Server password'),
+    '#size' => 30,
+    '#default_value' => variable_get('drupal_password', ''),
+    '#description' => t('XML-RPC server password. Useful, when XML-RPC server requires a password to access sites registry or when you require other sites to use password when connecting to your server. Set the same password on all sites. No password is required or posted when this option is blank.')
+  );
+
 
   $form['drupal_system'] = array(
     '#type' => 'radios',
@@ -168,7 +176,7 @@ function drupal_client_ping($client, $sy
   ** Parse our parameters:
   */
 
-  foreach (array('link', 'name', 'mail', 'slogan', 'mission') as $key) {
+  foreach (array('link', 'name', 'mail', 'slogan', 'mission', 'password') as $key) {
     $client[$key] = strip_tags($client[$key]);
   }
 
@@ -176,7 +184,7 @@ function drupal_client_ping($client, $sy
   ** Update the data in our database and send back a reply:
   */
 
-  if ($client['link'] && $client['name'] && $client['mail'] && $client['slogan'] && $client['mission']) {
+  if ($client['link'] && $client['name'] && $client['mail'] && $client['slogan'] && $client['mission'] && $client['mission'] && $client['password'] == variable_get('drupal_password', '')) {
     $result = db_query("SELECT cid FROM {client} WHERE link = '%s'", $client['link']);
     if (db_num_rows($result)) {
       $record = db_fetch_object($result);
@@ -271,6 +279,7 @@ function drupal_notify($server) {
     'mail' => variable_get('site_mail', ''),
     'slogan' => variable_get('site_slogan', ''),
     'mission' => variable_get('site_mission', ''),
+    'password' => variable_get('drupal_password', ''),
     'version' => VERSION
   );
   if (variable_get('drupal_system', 0)) {
