Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta
    • Component/s: clients
    • Security Level: Public
    • Labels:
      None
    • Environment:
      2.6rc1-36-g1a1deb9

      Description

      It seems that Apache Commons Codec has issues with certain kinds of base-64 encoding. Specifically with "membase-standard" and "password", the auth header was incorrect.

      http://techzone.couchbase.com/forums/thread/how-diagnose-spymemcached-client-issues-membase-server

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        jcody jcody added a comment -

        I experienced similar issues. It appears that in version 1.4 of Apache Commons Codec the Base64 function appends a CR-LF pair to the output. It did not do this in version 1.3 and was reverted to that original behavior in 1.5. (See https://issues.apache.org/jira/browse/CODEC-89 for detail.)

        The current version (2.7) of spymemcached attempts to remove the last two characters of the Base64 output, assuming the 1.4 behavior. This will cause errors in the case where the provided Apache Commons Codec jar is not version 1.4.

        I was able to work around the problem by either using version 1.4 of the Codec library rather than the newer version 1.5 or by modifying the spymemcached source to not strip the trailing two characters.

        The spymemcached source should probably either be modified to work with the newest Apache Commons Codec or a separate, stable Base64 encoder should be used in its place.

        Show
        jcody jcody added a comment - I experienced similar issues. It appears that in version 1.4 of Apache Commons Codec the Base64 function appends a CR-LF pair to the output. It did not do this in version 1.3 and was reverted to that original behavior in 1.5. (See https://issues.apache.org/jira/browse/CODEC-89 for detail.) The current version (2.7) of spymemcached attempts to remove the last two characters of the Base64 output, assuming the 1.4 behavior. This will cause errors in the case where the provided Apache Commons Codec jar is not version 1.4. I was able to work around the problem by either using version 1.4 of the Codec library rather than the newer version 1.5 or by modifying the spymemcached source to not strip the trailing two characters. The spymemcached source should probably either be modified to work with the newest Apache Commons Codec or a separate, stable Base64 encoder should be used in its place.
        Hide
        ingenthr Matt Ingenthron added a comment -

        @jcody thanks for identifying part of the issue. There is also likely an issue with the encoding, as one user had something with an @ in it. Will get these addressed shortly.

        Show
        ingenthr Matt Ingenthron added a comment - @jcody thanks for identifying part of the issue. There is also likely an issue with the encoding, as one user had something with an @ in it. Will get these addressed shortly.
        Hide
        ingenthr Matt Ingenthron added a comment -

        Fixed in 2.8-preview for spymemcached and fix will be in 2.7.1 as well.

        Show
        ingenthr Matt Ingenthron added a comment - Fixed in 2.8-preview for spymemcached and fix will be in 2.7.1 as well.

          People

          • Assignee:
            ingenthr Matt Ingenthron
            Reporter:
            ingenthr Matt Ingenthron
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3h
              3h
              Remaining:
              Remaining Estimate - 3h
              3h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Gerrit Reviews

                There are no open Gerrit changes