[Git][NTPsec/ntpsec][master] Make sure fetch_nonce() returns a string (not bytes)

Eric S. Raymond gitlab at mg.gitlab.com
Tue Nov 29 01:31:38 UTC 2016

Eric S. Raymond pushed to branch master at NTPsec / ntpsec

297b519b by Matt Selsky at 2016-11-28T19:58:06-05:00
Make sure fetch_nonce() returns a string (not bytes)

...otherwise we send a b'' around the nonce in the response with Python3.

Fixes GitLab issue #170

- - - - -

1 changed file:

- pylib/packet.py


--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -1172,7 +1172,7 @@ class ControlSession:
         if not self.response.startswith(polybytes("nonce=")):
             raise ControlException(SERR_BADNONCE)
-        return self.response.strip()
+        return polystr(self.response.strip())
     def mrulist(self, variables=None, rawhook=None):
         "Retrieve MRU list data"

View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/297b519ba6f6dbd9d2882952569f7e469aec6915
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161129/0fce1323/attachment.html>

More information about the vc mailing list