Skip to content

Commit 335156e

Browse files
committed
Allow mech.__str__ to be dotted form
Validate that sasl_name is nonempty before assigning it to base; this prevents the situation where the sasl_name query succeeds, but the contents of the name are empty. Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
1 parent fe6d5cc commit 335156e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gssapi/mechs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __unicode__(self):
5656

5757
def _bytes_desc(self):
5858
base = self.dotted_form
59-
if rfc5801 is not None:
59+
if rfc5801 is not None and self._saslname and self._saslname.mech_name:
6060
base = self._saslname.mech_name
6161

6262
if isinstance(base, six.text_type):

0 commit comments

Comments
 (0)