diff options
author | Josh Hoyt <josh@janrain.com> | 2006-03-16 20:22:57 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-03-16 20:22:57 +0000 |
commit | b6321984ed4f539ecc0595611c919de7819e20af (patch) | |
tree | b9e6be719ca80cdf1e81c00a0e77c2f5041264e0 /openid/oidutil.py | |
parent | 973bd1aba2ef524e6b28c8e7ce37a73425ce8240 (diff) | |
download | openid-b6321984ed4f539ecc0595611c919de7819e20af.tar.gz |
[project @ Fix case where the application will attempt to continue when the return_to is badly malformed and there is no trust_root specified]
Diffstat (limited to 'openid/oidutil.py')
-rw-r--r-- | openid/oidutil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openid/oidutil.py b/openid/oidutil.py index 715e3c3..69d95a1 100644 --- a/openid/oidutil.py +++ b/openid/oidutil.py @@ -88,3 +88,15 @@ def normalizeUrl(url): assert type(url) is str return url + +def isAbsoluteHTTPURL(url): + """Does this URL look like a http or https URL that has a host? + + @param url: The url to check + @type url: str + + @return: Whether the URL looks OK + @rtype: bool + """ + parts = urlparse.urlparse(url) + return parts[0] in ['http', 'https'] and parts[1] |