[GH-ISSUE #135] crash with invalid ip address #125

Closed
opened 2026-02-26 09:35:51 +03:00 by kerem · 1 comment
Owner

Originally created by @ThomasWaldmann on GitHub (Jan 18, 2014).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/135

Originally assigned to: @ThomasWaldmann on GitHub.

If an invalid IP (v4 or v6) address is given to update_authorized (e.g. via myip=...), it raises an (uncatched) ValueError:

  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 260, in get
    return _update(host, hostname, ipaddr, ssl, logger=logger)

  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 285, in _update
    kind = check_ip(ipaddr, ('ipv4', 'ipv6'))

  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 72, in check_ip
    af = dns.inet.af_for_address(ipaddr)

  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/inet.py", line 90, in af_for_address
    raise ValueError
Originally created by @ThomasWaldmann on GitHub (Jan 18, 2014). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/135 Originally assigned to: @ThomasWaldmann on GitHub. If an invalid IP (v4 or v6) address is given to update_authorized (e.g. via myip=...), it raises an (uncatched) ValueError: ``` File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 260, in get return _update(host, hostname, ipaddr, ssl, logger=logger) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 285, in _update kind = check_ip(ipaddr, ('ipv4', 'ipv6')) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 72, in check_ip af = dns.inet.af_for_address(ipaddr) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/inet.py", line 90, in af_for_address raise ValueError ```
kerem 2026-02-26 09:35:51 +03:00
  • closed this issue
  • added the
    bug
    easy
    labels
Author
Owner

@ThomasWaldmann commented on GitHub (Jan 21, 2014):

fixed by 5d2ee03e02

<!-- gh-comment-id:32884135 --> @ThomasWaldmann commented on GitHub (Jan 21, 2014): fixed by 5d2ee03e02c4131160b0b3f50edcfe0cbb903cb0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#125
No description provided.