# HG changeset patch # User neko259 # Date 2014-01-07 13:49:11 # Node ID 0e717b221f7467aef607366adb77e501658ad883 # Parent a244e8de5efdbcbab82ce327534804ef92ffc98d Check if the post is OP when opening a thread with post ID diff --git a/boards/views/__init__.py b/boards/views/__init__.py --- a/boards/views/__init__.py +++ b/boards/views/__init__.py @@ -211,6 +211,11 @@ def thread(request, post_id, mode=MODE_N kwargs = {} opening_post = get_object_or_404(Post, id=post_id) + + # If this is not OP, don't show it as it is + if not opening_post.is_opening(): + raise Http404 + if request.method == 'POST' and not opening_post.thread_new.archived: form = postFormClass(request.POST, request.FILES, error_class=PlainErrorList, **kwargs)