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

Undefined index: poster_id in file.php

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-a1
    • Fix Version/s: 3.1.0-a2
    • Component/s: Other, Posting
    • Labels:
      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

              • Assignee:
                bantu Andreas Fischer
                Reporter:
                prototech prototech
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: