Skip to content

Commit

Permalink
Issue #43 (0.9.21 Raises TypeError instead of DNSError when failing t…
Browse files Browse the repository at this point in the history
…o parse HTTPS records)
  • Loading branch information
paulc committed Sep 27, 2022
1 parent 16e4023 commit d1d1f38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ Changelog:
(Issue #32 - thanks to @sbv-csis)
Add --strip-aaaa option to dnslib.proxy
* 0.9.21 2022-09-19 Minor clean-up / add wheels to distro
* 0.9.22 2022-09027 Issue #43 (0.9.21 Raises TypeError instead of DNSError when failing to parse HTTPS records)
Note that we just fix the exception - there still seems to be a problem with parsing HTTPS records
(Thnaks to @robinlandstrom)

License:
--------
Expand Down
5 changes: 4 additions & 1 deletion dnslib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@
(Issue #32 - thanks to @sbv-csis)
Add --strip-aaaa option to dnslib.proxy
* 0.9.21 2022-09-19 Minor clean-up / add wheels to distro
* 0.9.22 2022-09027 Issue #43 (0.9.21 Raises TypeError instead of DNSError when failing to parse HTTPS records)
Note that we just fix the exception - there still seems to be a problem with parsing HTTPS records
(Thnaks to @robinlandstrom)
License:
--------
Expand All @@ -402,7 +405,7 @@

from dnslib.dns import *

version = "0.9.21"
version = "0.9.22"

if __name__ == '__main__':
import doctest,sys,textwrap
Expand Down
2 changes: 1 addition & 1 deletion dnslib/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ def parse(cls,buffer,length):
params.append((k, v))
return cls(priority, target, params)
except (BufferError,BimapError) as e:
raise DNSError("Error unpacking HTTPS: " + str(e) + binascii.hexlify(buffer.data[buffer.offset:]))
raise DNSError("Error unpacking HTTPS: " + str(e) + str(binascii.hexlify(buffer.data[buffer.offset:])))

def pack(self,buffer):
buffer.pack("!H", self.priority)
Expand Down

0 comments on commit d1d1f38

Please sign in to comment.