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

Patch for PHPBB3-14559 does not correctly handle all inline attachments inside quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.2.9, 3.3.0
    • Posting
    • None

      The patch added for PHPBB3-14559 only fixes the single case where someone uses the quote-reply button to quote a post containing an inline attachment. It does not fix:

      1. Posts which add a quote containing an inline attachment by using the quote button in the message history in the editor
      2. Posts which were already created before the patch which contained an attachment tag inside of a quote tag
      3. Any other scenario where a user manually copies and pastes BBCode containing attachment tags

      A more correct solution for this problem is to associate the nested attachment tag with the post ID on the parent [quote] tag, if one exists, and load attachment data that way using a (post_id, index) composite key. (Using indexes for attachments is pretty much always wrong since they aren’t unique or immutable, unlike attach_id, but whatever.)

      A less good alternative—which would be needed anyway for quotes which don’t include the original post ID—is for the template for <ATTACHMENT> to look in the ancestor axis for a <QUOTE> element, and if there is one, don’t output the comment hack which is used to process and replace the inline attachment at render time.

            Unassigned Unassigned
            Snover Snover [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: