server/uplaod.py: fix bug when an invalid range is taken for an IP range