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.
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)