Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects versions: 1.0.2
    • Fix versions: 1.0.3
    • Components: Glassfish
    • Labels:
      None

      Description

      I develop on Glassfish with a blank admin password.

      org.codehaus.cargo.util.CargoException: password needs to be 8 characters or longer
      at org.codehaus.cargo.container.glassfish.GlassFishStandaloneLocalConfiguration.getPasswordFile(GlassFishStandaloneLocalConfiguration.java:93)
      at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.addConnectOptions(GlassFishInstalledLocalDeployer.java:198)
      at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.doDeploy(GlassFishInstalledLocalDeployer.java:118)
      at org.codehaus.cargo.container.glassfish.GlassFishInstalledLocalDeployer.redeploy(GlassFishInstalledLocalDeployer.java:95)
      at org.codehaus.cargo.maven2.DeployerRedeployMojo.performDeployerActionOnSingleDeployable(DeployerRedeployMojo.java:40)
      at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:112)
      at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:55)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      

      On http://svn.plexus.codehaus.org/browse/~raw,r=43/cargo-contrib/glassfish/src/main/java/org/codehaus/cargo/container/glassfish/GlassFishStandaloneLocalConfiguration.java I found:

      // ...
      String password = getPropertyValue(RemotePropertySet.PASSWORD);
      if(password.length()<8)
      throw new CargoException("password needs to be 8 characters or longer");
      
      try {
      File f = new File(getHome(), "password.properties");
      if(!f.exists()) {
      getFileHandler().mkdirs(getHome());
      FileWriter w = new FileWriter(f);
      // somehow glassfish uses both. Brain-dead.
      w.write("AS_ADMIN_PASSWORD="+password+"\n");
      w.write("AS_ADMIN_ADMINPASSWORD="+password+"\n");
      w.close();
      }
      return f;
      // ...
      

      Oh yes, when system property with password is set, then it's validated (ekhm...) against length. When properties come from /tmp/cargo/conf/password.properties - not. This weird validation should be removed.
      A workaround for now is to keep the blank password in /tmp/cargo/conf/password.properties...

        Attachments

          Activity

            People

            • Assignee:
              savasalitokmen Savas Ali Tokmen (Inactive)
              Reporter:
              damiannowak Damian Nowak (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: