diff --git a/checkin_notes b/checkin_notes index 7d7ac22855..929ede0664 100755 --- a/checkin_notes +++ b/checkin_notes @@ -12812,3 +12812,20 @@ Bruce 7 Oct 2005 user/ edit_passwd_action.php +David 7 Oct 2005 + - Add optional element to config.xml. + The change-password web pages get min passwd length from here. + The get_project_config.php RPC gets it from here also. + Default in both cases is 6. + - Add optional element to config.xml. + This is to be used by projects that have not + updated to version 5 server software yet + (i.e. that don't have create_account.php, + and the database updates that go along with it). + As soon as all projects have upgraded we can get rid of this. + + client/ + pers_file_xfer.C + html/user/ + edit_passwd_action.php + sample_get_project_config.php diff --git a/client/pers_file_xfer.C b/client/pers_file_xfer.C index dcc9c82cec..8b5fe45da3 100644 --- a/client/pers_file_xfer.C +++ b/client/pers_file_xfer.C @@ -258,8 +258,6 @@ bool PERS_FILE_XFER::poll() { // void PERS_FILE_XFER::check_giveup(const char* why) { if (fip->get_next_url(fip->upload_when_present) == NULL) { - // the file has no appropriate download location - // remove the file from the directory and delete the file xfer object gstate.file_xfers->remove(fxp); delete fxp; fxp = NULL; @@ -299,13 +297,15 @@ void PERS_FILE_XFER::handle_xfer_failure() { } if (fxp->file_xfer_retval == HTTP_STATUS_NOT_FOUND) { - // If it is uploading and receives a HTTP_STATUS_NOT_FOUND then - // the file upload handler could not be found. - if (!fxp->is_upload) { - check_giveup("file was not found on server"); + if (fxp->is_upload) { + // If it is uploading and receives a HTTP_STATUS_NOT_FOUND then + // the file upload handler could not be found. + // This is hopefully transient. + // + retry_or_backoff(); return; } else { - retry_or_backoff(); + check_giveup("file was not found on server"); return; } } diff --git a/doc/configuration.php b/doc/configuration.php index 57f2916b93..a27ff3d478 100644 --- a/doc/configuration.php +++ b/doc/configuration.php @@ -16,7 +16,6 @@ A config.xml file looks like this:
",
 htmlspecialchars("
 
-
   
                       project.hostname.ip   
                    databasename          
@@ -34,26 +33,28 @@ htmlspecialchars("
         http://A/URL          
                    /path/to/directory    
 
-    [                                                 ]
-    [                                                        ]
-    [                                                             ]
-    [                                               ]
-    [                   N                     ]
-    [             N               ]
-    [                N                  ]
-    [                                                       ]
-    [                                        ]
-    [                                                      ]
-    [   N     ]
-    [           N                                             ]
-    [                                                           ]
+    [  ]
+    [  ]
+    [  ]
+    [  ]
+    [  N  ]
+    [  N  ]
+    [  N  ]
+    [  ]
+    [  ]
+    [  ]
+    [  N  ]
+    [  N  ]
+    [  ]
     [  N  ]
-    [   N   ]
-    [   N   ]
-    [   N   ]
-    [   N   ]
-    [   path   ]
+    [  N  ]
+    [  N  ]
+    [  N  ]
+    [  N  ]
+    [  path  ]
+    [  N  ]
+    [  ]
 
 
     
@@ -99,7 +100,10 @@ htmlspecialchars("
 
 echo "The general project configuration elements are:";
 list_start();
-list_item("host", "name of project's main host, as given by Python's socket.hostname().  Daemons and tasks run on this host by default.");
+list_item("host",
+    "name of project's main host, as given by Python's socket.hostname().
+    Daemons and tasks run on this host by default."
+);
 list_item("db_name", "Database name");
 list_item("db_host", "Database host machine");
 list_item("db_user", "Database user name");
@@ -264,6 +268,17 @@ list_item("nowork_skip",
     preferences when users click on Update.
     Use it if your server DB is overloaded."
 );
+list_item("min_passwd_length",
+    "Minimum length of user passwords.  Default is 6."
+);
+list_item("client_account_creation_disabled",
+    "If set, this project doesn't support the web RPCs for
+    looking up and creating accounts.
+    This is a temporary kludge as we transition from
+    version 4 to version 5 software.
+    It should be removed by 12/2005 or so."
+);
+
 list_end();
 
 // THE INFORMATION BELOW NEEDS TO BE ORGANIZED AND PUT INTO TABLES OR SOME OTHER LESS CRAMPED FORM
diff --git a/html/user/edit_passwd_action.php b/html/user/edit_passwd_action.php
index 38542267da..55bb385b7d 100644
--- a/html/user/edit_passwd_action.php
+++ b/html/user/edit_passwd_action.php
@@ -19,8 +19,16 @@ $passwd2 = stripslashes(post_str("passwd2"));
 if ($passwd != $passwd2) {
     error_page("New passwords are different");
 }
-if (strlen($passwd)<6) {
-    error_page("New password is too short: minimum password length is 6 characters");
+
+$config = get_config();
+$min_passwd_length = parse_config($config, "");
+if (!$min_passwd_length) $min_passwd_length = 6;
+
+if (strlen($passwd)<$min_passwd_length) {
+    error_page(
+        "New password is too short:
+        minimum password length is $min_passwd_length characters."
+    );
 }
 if ($auth) {
     $user = lookup_user_auth($auth);
diff --git a/html/user/sample_get_project_config.php b/html/user/sample_get_project_config.php
index 2d8360bd4a..bd05bc7f02 100644
--- a/html/user/sample_get_project_config.php
+++ b/html/user/sample_get_project_config.php
@@ -6,17 +6,26 @@ require_once("../inc/xml.inc");
 xml_header();
 
 $config = get_config();
-$name = parse_config($config, "");
+$long_name = parse_config($config, "");
+$min_passwd_length = parse_config($config, "");
+if (!$min_passwd_length) {
+    $min_passwd_length = 6;
+}
+$disable_account_creation = parse_bool($config, "disable_account_creation");
+$client_account_creation_disabled = parse_bool($config, "client_account_creation_disabled");
 
 echo "
-    $name
+    $long_name
 ";
 
-if (parse_bool($config, "disable_account_creation")) {
+if ($disable_account_creation) {
     echo "    \n";
 }
+if ($client_account_creation_disabled) {
+    echo "    \n";
+}
 echo "
-    6
+    $min_passwd_length
 
 ";