fix: don't send invalid URLs back to the user (#16687)

* fix: don't send bogus URLs back to the user

* lint, remove f string
This commit is contained in:
Daniel Vaz Gaspar 2021-09-14 11:29:05 +01:00 committed by GitHub
parent ad60c0c4ad
commit 5ac8ac0e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class R(BaseSupersetView): # pylint: disable=invalid-name
url = request.form.get("data")
if not self._validate_url(url):
logger.warning("Invalid URL: %s", url)
return Response(f"Invalid URL: {url}", 400)
return Response("Invalid URL", 400)
obj = models.Url(url=url)
db.session.add(obj)
db.session.commit()