Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Merge commit '28824d3'
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Jul 20, 2011
2 parents 92a1e1b + 28824d3 commit 7380b17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/feedback/tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def test_private_ips_not_allowed(self):
('http://127.0.0.1', True),
('HTTP://10.0.0.13', True),
('https://192.168.0.4', True),
('http://localhost', True),
)
for pattern in patterns:
if pattern[1]:
Expand Down
2 changes: 1 addition & 1 deletion apps/feedback/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
r'(?:172\.1[6-9]\.)|'
r'(?:172\.2[0-9]\.)|'
r'(?:172\.3[0-1]\.)|'
r'(?:localhost)|'
r'(?:192\.168\.)', re.IGNORECASE)

# Simple "possibly a URL" regex
Expand Down Expand Up @@ -78,7 +79,6 @@ class ExtendedURLValidator(validators.URLValidator):
r'^chrome://[a-z][/?\.\S]+$|' # chrome://... URLs
r'^https?://' # http:// or https://
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?|' # domain...
r'localhost|' # localhost...
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
r'(?::\d+)?' # optional port
r'(?:/?|[/?]\S+)$', re.IGNORECASE)

0 comments on commit 7380b17

Please sign in to comment.