Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11986

Undefined index: poster_id in file.php

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a2
    • 3.1.0-a1
    • Other, Posting
    • None

      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.

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

              Created:
              Updated:
              Resolved: