diff --git a/frappe/event_streaming/doctype/event_producer/event_producer.py b/frappe/event_streaming/doctype/event_producer/event_producer.py index 8785ee9989..4836276734 100644 --- a/frappe/event_streaming/doctype/event_producer/event_producer.py +++ b/frappe/event_streaming/doctype/event_producer/event_producer.py @@ -55,7 +55,7 @@ class EventProducer(Document): self.reload() def check_url(self): - valid_url_schemes = ("http", "https", "ftp", "ftps") + valid_url_schemes = ("http", "https") frappe.utils.validate_url(self.producer_url, throw=True, valid_schemes=valid_url_schemes) # remove '/' from the end of the url like http://test_site.com/ diff --git a/frappe/tests/test_utils.py b/frappe/tests/test_utils.py index 998afb86c1..74ceec8287 100644 --- a/frappe/tests/test_utils.py +++ b/frappe/tests/test_utils.py @@ -154,7 +154,7 @@ class TestValidationUtils(unittest.TestCase): self.assertRaises( frappe.ValidationError, validate_url, - 'bitcoin://joker.edu', + 'gopher://frappe.io', valid_schemes='https', throw=True ) diff --git a/frappe/utils/__init__.py b/frappe/utils/__init__.py index 41d9a07542..1da4cd3bae 100644 --- a/frappe/utils/__init__.py +++ b/frappe/utils/__init__.py @@ -157,7 +157,7 @@ def split_emails(txt): def validate_url(txt, throw=False, valid_schemes=None): """ - Tests wether the `txt` is a valid URL + Checks whether `txt` has a valid URL string Parameters: throw (`bool`): throws a validationError if URL is not valid