Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33830

T26 Generation of Macro Body Hash

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      The generation of the macro body hash is not working correctly. It happens in two spots:

      1) In the MacroModuleContextExtractorImpl (Connect Source). This call happens during the execution of a dynamic content connect macro. Despite the source calling the variable storageFormatBody, its actually the view format. This calculation is wrong, it should be using the storage format. This class is a normal p2 macro which runs inside Confluence and is responsible for doing things like render the html with the iframe.
      2) In the ContentMacroServiceImpl (Confluence Source). This calculation is correct, its based on the macro body in storage format. This call happens (eventually) after the call to the REST api to collect the body.

      Problem: Inside a normal execution of a macro, there is no (obvious?) way to collect the macro body in storage format so there is no obvious way for the connect macro to calculate the macro hash correctly.

      Ideal solution:
      Rendering engine calculates the hash and passes it to each macro execution through the RenderContext. This moves the entire calculation of the hash to the Confluence source code and makes sure its the same.

      Interim solution:
      Work out how a normal p2 plugin can access the macro body in storage format so it can calculate the hash correctly.

      Attachments

        Issue Links

          Activity

            People

              richatkins Richard Atkins
              mjensen m@ (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: