--- a/src/modules/misc.py Thu Jun 11 09:41:21 2009 -0700
+++ b/src/modules/misc.py Thu Jun 11 12:04:51 2009 -0500
@@ -206,9 +206,11 @@
def valid_pub_prefix(prefix):
"""Verify that the publisher prefix only contains valid characters."""
+ if not prefix:
+ return False
+
# This is a workaround for the the hostname_re being slow when
# it comes to finding invalid characters in the prefix string.
-
if _invalid_host_chars.match(prefix):
# prefix bad chars
return False
@@ -221,6 +223,9 @@
def valid_pub_url(url):
"""Verify that the publisher URL contains only valid characters."""
+ if not url:
+ return False
+
# First split the URL and check if the scheme is one we support
o = urlparse.urlsplit(url)