Skip to content

Commit

Permalink
fix: don't send invalid URLs back to the user (#16687)
Browse files Browse the repository at this point in the history
* fix: don't send bogus URLs back to the user

* lint, remove f string
  • Loading branch information
dpgaspar authored Sep 14, 2021
1 parent ad60c0c commit 5ac8ac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/views/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def shortner(self) -> FlaskResponse:
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()
Expand Down

0 comments on commit 5ac8ac0

Please sign in to comment.