parent
a8c1273682
commit
7be32dd70c
@ -85,9 +85,10 @@ def _is_url_naive(urlstr):
|
|||||||
else:
|
else:
|
||||||
# Valid IPv4/IPv6 address
|
# Valid IPv4/IPv6 address
|
||||||
return True
|
return True
|
||||||
if re.search(r'^[0-9.]+$', urlstr):
|
if re.search(r'^([0-9.]+|0x[a-fA-F0-9]+)$', urlstr):
|
||||||
# Qt treats things like "23.42" or "1337" as valid URLs which we don't
|
# Qt treats things like "23.42" or "1337" or "0xDEAD" as valid URLs
|
||||||
# want to. Note we already filtered *real* valid IPs above.
|
# which we don't want to. Note we already filtered *real* valid IPs
|
||||||
|
# above.
|
||||||
return False
|
return False
|
||||||
elif not url.isValid():
|
elif not url.isValid():
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user