Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-329

DefaultUsersJdbcRepository readUserFromResultSet incorrect

    Details

      Description

      Lines 49-50 in the DefaultUsersJdbcRepository.java are reversed for the getString values.

      Consequently, the class is unable to authenticate any users.

      The lines are:
      String passwordAlg = rsUsers.getString(2);
      String passwordHash = rsUsers.getString(3);

      They should be:
      String passwordHash = rsUsers.getString(2);
      String passwordAlg = rsUsers.getString(3);

      Alternatively, the SQLResources.xml file can be changed on line 148 from:
      <sql name="select">SELECT username, pwdHash, pwdAlgorithm
      to:
      <sql name="select">SELECT username, pwdAlgorithm, pwdHash
      but this would then be out of line with the rest of the file.

        Attachments

          Activity

            People

            • Assignee:
              bago Stefano Bagnara
              Reporter:
              vhines Vaughan Hines
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: