mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 21:18:02 +00:00
String search returns > 0 if found...
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user