Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4983

In debug mode Properties file login module reurns loginsucceeded as true for non existent users and null password

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.4, 2.2
    • 2.1.5, 2.2.1
    • None
    • Security Level: public (Regular issues)
    • None
    • windows Xp, eclipse

    • Patch Available

    Description

      While debugging one of the login fallback code I see that PropertiesFileLoginModule.java returns loginsucceeded as true for a non-existent user and null password.
      This happens under the following use case.

      In the BasicAuthenticator Code I have the following
      String username=header.substring(10);
      String password=null;
      principal = context.getRealm().authenticate(username, password);

      In the login method of PropertiesFileLoginModule as per the above usecase we will have
      realPassword as null and password as null as a result "if (!checkPassword(realPassword, password))"
      will be skipped and hence resulting in loginSucceeded=true.

      Attachments

        1. GERONIMO-4983.patch
          1.0 kB
          Ashish Jain

        Activity

          People

            genspring Lin Quan Jiang
            ashishjain Ashish Jain
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: