Skip to content

Exception when LDAP parsing fails #1

@bugch3ck

Description

@bugch3ck

Caught this exception while running basic tests.

Exception happened during processing of request from ('192.168.0.185', 57566)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
    self.handle()
  File "/root/imposter/src/msldap_server.py", line 35, in handle
    req = ldap_request_parse(data)
  File "/root/imposter/src/msldap_utils.py", line 11, in ldap_request_parse
    msg = decoder.decode(data, asn1Spec=LDAPMessage())[0]
  File "/usr/lib/python2.7/dist-packages/pyasn1/codec/ber/decoder.py", line 560, in __call__
    'Short octet stream on tag decoding'
SubstrateUnderrunError: Short octet stream on tag decoding

Fix exception handling when parsing LDAP messages.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions