Ignore:
Timestamp:
2015-07-24T22:48:03+12:00 (9 years ago)
Author:
ak19
Message:

Fixing bug in GS3 installer that didn't use the longer password provided, despite the installer now allowing more than 8. The problem was bigger and manifold. 1. Fixed ModifyUsersDB to allow up to and incl 20 chars instead of 8. 2. Fixed the DerbyWrapper classes since the ant config-admin and config-user tasks had stopped working when global.properties was consulted for the derbyserver name and port. Now providing fallbacks again for the installer. 3. build.xml may no longer need to stop tomcat then modify the derby db and then start tomcat again because we're no longer using an embedded derby, but because we're using a networked derby, modifying the usersdb now didn't work unless greenstone (actually derby) was running. Changed the config targets to allow modifying admin and user data even if greenstone is not running, by making the update-userdb target that's called by these two tasks ensure the derbyserver is running before modifying the userdb, and stopping it if it was started up by the target.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/ModifyUsersDB.java

    r29467 r30055  
    2727public class ModifyUsersDB
    2828{
     29    public static int PWD_MIN_LENGTH = 3;
     30    public static int PWD_MAX_LENGTH = 20;
    2931
    3032    public static void main(String[] args) throws SQLException
     
    4951
    5052        // If the user specifically sets any of the fields on the cmdline, they'll be overwritten in the db,
    51         // even if the user had set them to empty. Except the password which must be between 3 and 8 characters.
     53        // even if the user had set them to empty. Except the password which must be between PWD_MIN_LENGTH and PWD_MAX_LENGTH characters.
    5254        for (int i = 2; i < args.length; i++)
    5355        {
     
    5658                password = args[i].substring("password=".length());
    5759
    58                 if (password.length() < 3 || password.length() > 8)
     60                if (password.length() < PWD_MIN_LENGTH || password.length() > PWD_MAX_LENGTH)
    5961                {
    6062                    if (!password.equals(""))
    6163                    {
    62                         System.out.println("Password not updated. It should be between 3 and 8 characters (inclusive).");
     64                        System.out.println("Password not updated. It should be between " + PWD_MIN_LENGTH + " and " + PWD_MAX_LENGTH + " characters (inclusive).");
    6365                    }
    6466                }
Note: See TracChangeset for help on using the changeset viewer.