Closed jumpifnotzero closed 1 year ago
So that I understand, the issue is that the IP address portion of the cidr only had 3 octets instead of 4? Did you use the rdap command to issue the query or something like curl?
Doh! I see the issue right here: https://github.com/icann/icann-rdap/blob/3407761ba4a5baf6a4b6ffc5317d456d2de2e6ad/icann-rdap-srv/src/rdap/ip.rs#L25
The server is checking if the input is in CIDR form, but not passing in the canonical CIDR to the storage engine. cidr_utils::IpCidr is quite liberal in what it accepts, and so "229.0.0/24" will yield true on is_ip_cidr() but that may cause an error in the backend storage.
Fixed in commit f9598ead8a1bc993abd930edf3e3e4c661900455 when it is merged.
Merged in #20
Query for /ip/229.0.0/24 causes an error in the logs
2023-06-05T21:17:56.420225Z ERROR tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=0 ms
Interestingly, I used the 224.0.0/24 to create the data (rdap-srv-data network --cidr 224.0.0/24).
I don't think it is related, but server has objects for 224.0.0.7/32, 224.0.0.0/24 and 224.0.0.0/8.