Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11986

Undefined index: poster_id in file.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.0-a1
    • 3.1.0-a2
    • Other, Posting
    • None

    Description

      The poster_id field is not selected when grabbing the attachment data in file.php. This is used to check whether the attachment belongs to the user later on:

      	if ($attachment['is_orphan'])
      	{
      		// We allow admins having attachment permissions to see orphan attachments...
      		$own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;

      This results in a PHP notice and phpBB outputting the following error to the user: "The selected attachment does not exist anymore." This is what's causing http://area51.phpbb.com/phpBB/viewtopic.php?f=81&t=44811. David couldn't reproduce the issue due to the a_ permission check in the statement.

      Attachments

        Issue Links

          Activity

            People

              bantu Andreas Fischer [X] (Inactive)
              prototech prototech [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: