Merge github.com:web2py/web2py

This commit is contained in:
Michele Comitini
2012-10-13 15:17:58 +02:00
4 changed files with 13 additions and 2 deletions
+2
View File
@@ -190,6 +190,8 @@ def is_valid_ip_address(address):
elif address.lower() in ('unkown',''):
return False
elif address.count('.')==3: # assume IPv4
if address.startswith('::ffff:'):
address = address[7:]
if hasattr(socket,'inet_aton'): # try validate using the OS
try:
addr = socket.inet_aton(address)