[Git][NTPsec/ntpsec][master] ifstats: fix dropping of valid interfaces. Fixes #298
Gary E. Miller
gitlab at mg.gitlab.com
Wed May 10 18:39:05 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
9f6b1b8f by Gary E. Miller at 2017-05-10T11:38:48-07:00
ifstats: fix dropping of valid interfaces. Fixes #298
The method for dropping bad messages was too agressive. The
method is slow and ugly, should be improved.
- - - - -
1 changed file:
- pylib/util.py
Changes:
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -1046,8 +1046,11 @@ class IfstatsSummary:
except TypeError:
# Can happen when ntpd ships a corrupted response
return ''
+
+ # FIXME, a brutal and slow way to check for invalid chars..
+ # maybe just strip non-printing chars?
for c in s:
- if not c.isalnum() and c not in "/.:[] \n":
+ if not c.isalnum() and c not in "/.:[] \%\n":
return ''
return s
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9f6b1b8fe64ac46fefa3759cd941ef9fb02780c7
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9f6b1b8fe64ac46fefa3759cd941ef9fb02780c7
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170510/5ae96b0d/attachment.html>
More information about the vc
mailing list