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

Editing with test user permissions causes vanishing attachments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.3
    • 3.0.RC3
    • Posting
    • None
    • PHP Environment: PHP 5.2.1
      Database: MySQL 4.1.21

      There is a bug with the "Test out user permissions" system. When using the test user permissions, one can still edit their own original post, and if the user does not have permission to view attachments on that forum, the attachments attached to the post will not be shown on the post, but still exist.

      Testcase:
      -------------
      Note:
      User A is admin
      User M is normal member, without any special permissions.
      Forum F has permission to disallow normal members to download attachments.
      Post P is the affected post, posted with attachments.

      Steps:
      1. A posts a topic (with post P) with an attachment in Forum F.
      2. A clicks on Test user's permission with M's permissions.
      3. A goes to topic in Forum F.
      4. A edits the post and saves it.
      5. The attachment is now missing from the post, even after you revert to admin permissions/reedit it.

      However, the attachment:
      1. Is NOT listed under orphaned attachments
      2. Still appears linked to the topic when checked via UCP's Manage Attachments.
      3. viewforums.php still displays the attachment icon for the topic.
      -------------

      Manually fixing the problem:
      I manually fixed it by using phpmyadmin:
      1. Go to the phpbb_posts table
      2. Searched for the post ID
      3. Edited post_attachment value to 1 from 0.
      4. Save

            Acyd Burn Meik Sievertsen [X] (Inactive)
            akaru akaru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: