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

Velocity scripts share the same macro namespace

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Blocker
    • None
    • 2.0.2
    • Velocity
    • None
    • Unknown

    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

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

              Dates

                Created:
                Updated:
                Resolved: