diff --git a/ivatar/views.py b/ivatar/views.py index d892539..d1dcb4d 100644 --- a/ivatar/views.py +++ b/ivatar/views.py @@ -142,10 +142,12 @@ class AvatarImageView(TemplateView): # Check if default starts with an URL scheme and if it does, # check if it's trusted # Check for :// (schema) - if default is not None and default.find("://"): + if default is not None and default.find("://") > 0: # Check if it's trusted, if not, reset to None if not any(x in default for x in TRUSTED_DEFAULT_URLS): - print("Default URL is not in trusted URLs. Kicking it!") + print( + "Default URL is not in trusted URLs: '%s' ; Kicking it!" % default + ) default = None if "f" in request.GET: