Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-6705

Velocity scripts share the same macro namespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Velocity
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      When a macro M is defined in velocity script in a page A, it is available to all velocity scripts in other pages in the wiki.

      This can cause problems on concurrency, when it creates race conditions: if pages A and B both define macro M, with the same name but different definition, this situation can happen:

      1. A executes defines M
      2. B executes defines M
      3. A executes the rest of code that uses macro M
      4. B executes the rest of the code that uses macro M

      At step 3, A will use macro M defined by B, instead of macro M defined by A that it expects.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: