From 652df88342e2536f2b79eae01a262ba08defc115 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 19 Mar 2016 20:28:25 +0100 Subject: [PATCH] return 404 --- pandora/item/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/views.py b/pandora/item/views.py index a73333af..a17342d6 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -1140,6 +1140,8 @@ def oembed(request): url = request.GET['url'] parts = urlparse(url).path.split('/') + if not len(parts) < 2: + raise Http404 public_id = parts[1] item = get_object_or_404_json(models.Item, public_id=public_id) embed_url = request.build_absolute_uri('/%s' % public_id)