homebridge-rpi
homebridge-rpi copied to clipboard
bad hostname validation
trafficstars
It appears that rpi will not accept a hostname where any part of the FQDN begins with a digit, even though these are valid hostnames:
$ rpi -H 2example.com info
rpi: error: host: 2example.com: not a valid hostname or IPv4 address
$ rpi -H something.2example.com info
rpi: error: host: something.2example.com: not a valid hostname or IPv4 address
Indeed, the original RFC 952 from 1985 didn’t allow a hostname to start with a number, but they changed that in RFC 1123 in 1989. I don’t remember where I got the specs, but clearly, I got the wrong one. This affects all hostname checks through OptionParser in homebridge-lib.
Fixed in homebridge-lib v5.6.3. If you re-install Homebridge RPi, it should pick up this version.