Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4892

SASL data type exception for PLAIN

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: Python - Library
    • Labels:
      None

      Description

      From: https://github.com/apache/thrift/pull/1804

      A small data type mistake were observed during usage of SASL mechanism="PLAIN".
      on 379-380 lines there're 2 calls of send_sasl_msg, where 1st uses sels.sasl.mechanism, which is of type str(), while 2nd uses self.sasl.process(), which generates bytes().

      exception happens on line 402, where header generated on line 401 using pack() which returns type bytes() being concatenated with body provided to send_sasl_msg() func.
      Since self.transport.write accepts bytes() only, it's better to use bytes everywhere...

      on the line 420 we have similar error, where str().join() is being called, but both parameters passed to it are of type bytes(), which raises an exception.

        Attachments

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              jking3 James E. King III
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m