aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorayleph <ayleph@thisshitistemp.com>2014-08-16 10:45:58 -0700
committerJessica Tallon <jessica@megworld.co.uk>2014-08-19 14:30:45 +0100
commitb56cd89eb8cad5f2b4ac50d6c2cdba9ef3b90081 (patch)
tree2041c3fbe57e86705404d11a68aebf9ba7ddd529
parent3322a63df41f1b58d830aad0156160e6b532b5d7 (diff)
downloadmediagoblin-b56cd89eb8cad5f2b4ac50d6c2cdba9ef3b90081.tar.lz
mediagoblin-b56cd89eb8cad5f2b4ac50d6c2cdba9ef3b90081.tar.xz
mediagoblin-b56cd89eb8cad5f2b4ac50d6c2cdba9ef3b90081.zip
List blogs by URL user rather than request user
The blog_post_listing function in mediagoblin/media_types/blow/views.py attempts to access blogs based on the requesting user rather than the url user. This results in server errors when an unauthenticated user attempts to follow a link from another user's blog post listing, and 404 errors when an authenticated user attempts to follow a link from another user's blog post listing. This change bases blog post listings on the URL user rather than the request user.
-rw-r--r--mediagoblin/media_types/blog/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/media_types/blog/views.py b/mediagoblin/media_types/blog/views.py
index a367bef8..62806c3c 100644
--- a/mediagoblin/media_types/blog/views.py
+++ b/mediagoblin/media_types/blog/views.py
@@ -260,7 +260,7 @@ def blog_post_listing(request, page, url_user=None):
Page, listing all the blog posts of a particular blog.
"""
blog_slug = request.matchdict.get('blog_slug', None)
- blog = get_blog_by_slug(request, blog_slug, author=request.user.id)
+ blog = get_blog_by_slug(request, blog_slug, author=url_user.id)
if not blog:
return render_404(request)