Commit Graph

7 Commits

Author SHA1 Message Date
Christian Ulrich
0d3af5454b Only allow IPv4 literals in strict form (#18656)
* Only allow IPv4 literals in strict form

The strict form as defined in RFC 6943, section 3.1.1 only allows the dotted
form ddd.ddd.ddd.ddd of IPv4 literals, where ddd is a one to three digit decimal
number between 0 and 255. Until now octal numbers (with a leading zero) were
interpreted as decimal numbers which has security implications, see
CVE-2021-29922 and CVE-2021-29923.

* Update lib/pure/net.nim

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-08-08 19:11:07 +01:00
flywind
271f68259b remove some noises in tests (#16448) 2020-12-27 14:45:57 +01:00
Arne Döring
9c2365d5c2 activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
LemonBoy
a27429304e Convert *_family fields to cushort
Fixes #9008
2018-09-19 12:33:11 +02:00
Yuriy Glukhov
b2323de914 Fixed compilation error when Sockaddr_in4 or Sockaddr_in6 passed to fromSockAddr 2018-06-07 21:10:00 +03:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02:00
Nathan Hoad
5978625c12 Make IP address checking more obvious, and add tests for the net module. 2015-03-07 12:37:52 +11:00