Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ejabberd 2.0.0-beta
    • Fix Version/s: ejabberd 2.0.0
    • Labels:
      None
    • Environment:
      debian sid, postgresql 8.2/8.3. Binary and source install (tried both).

      Description

      When using odbc_auth with postgresql native driver, I can register users but cannot authenticate. Logs show the challenge/response fails and ejabberd returns not-authorized. I worked on this for a good 2 days and it's not simply a matter of not having the correct password. Just changing odbc_auth to internal_auth makes everything work. I tried enabling and disabling all the modules that support odbc to see if that would make a difference, but nothing. Tried compiling from source, using two different versions of postgresql, and went though a ton of different configuration parameters.

      The strange thing is that ejabberd is querying the database when the authorization request hits, but it's not hashing the password correctly or something. No errors, just fails the authorization.

        Activity

        Hide
        badlop Badlop added a comment -

        The problem seems related with this commit:
        https://forge.process-one.net/changelog/ejabberd-modules/pgsql?cs=438

        Using a slightly older version from ejabberd-modules SVN, authentication works correctly:
        svn up -r 412

        Show
        badlop Badlop added a comment - The problem seems related with this commit: https://forge.process-one.net/changelog/ejabberd-modules/pgsql?cs=438 Using a slightly older version from ejabberd-modules SVN, authentication works correctly: svn up -r 412
        Hide
        badlop Badlop added a comment -

        Quite probably, the problematic change in the pgsql library is this one:
        http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/pgsql/src/pgsql_util.erl?revision=1.5&view=markup

        The CVS Log says:
        > A backwards incompatible change, but slow steps to a better library.
        > * Supports null values
        > * Convert types into sensible erlang terms (many, not all).

        There are two solutions:
        A) Improve ejabberd so that it supports this updated pgsql version.
        B) Don't improve ejabberd. Explain in the ejabberd Guide and in Release Notes that a not-recent version of the library is required. Include in the Binary Installer the old version.

        Show
        badlop Badlop added a comment - Quite probably, the problematic change in the pgsql library is this one: http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/pgsql/src/pgsql_util.erl?revision=1.5&view=markup The CVS Log says: > A backwards incompatible change, but slow steps to a better library. > * Supports null values > * Convert types into sensible erlang terms (many, not all). There are two solutions: A) Improve ejabberd so that it supports this updated pgsql version. B) Don't improve ejabberd. Explain in the ejabberd Guide and in Release Notes that a not-recent version of the library is required. Include in the Binary Installer the old version.
        Hide
        cromain@process-one.net Christophe Romain added a comment -

        Yes, I checked and this patch breaks things.
        for the moment, I included the old version in the installer.
        I will document that except if i can improve ejabberd before 2.0.0
        final release.

        Show
        cromain@process-one.net Christophe Romain added a comment - Yes, I checked and this patch breaks things. for the moment, I included the old version in the installer. I will document that except if i can improve ejabberd before 2.0.0 final release.
        Hide
        badlop Badlop added a comment -

        Alexey looked at the pgsql patch from Jungerl CVS and found that it changes the API. So, to make ejabberd compatible with that patch, some parts ejabberd code would need to be rewritten, and compatibility with the mysql module might get lost.

        Show
        badlop Badlop added a comment - Alexey looked at the pgsql patch from Jungerl CVS and found that it changes the API. So, to make ejabberd compatible with that patch, some parts ejabberd code would need to be rewritten, and compatibility with the mysql module might get lost.
        Hide
        cromain@process-one.net Christophe Romain added a comment -

        i rollbacked the svn back to r412

        Show
        cromain@process-one.net Christophe Romain added a comment - i rollbacked the svn back to r412

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development