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

User macro with trailing backslash in parameter cannot be saved throws log error

    XMLWordPrintable

Details

    Description

      Creating a user macro with a string parameter which ends with a backslash, results in a page that cannot be saved.

      Steps to reproduce:
      1. Create a user macro:

      ## Macro title: testbackslash
      ## Macro has a body: N
      
      ## @param FilePath:title=Filepath|type=string|required=true
      $paramFilePath
      

      2. Create a new black page

      3. Insert the user macro and set the parameter to e.g. C:\

      4. Save the marco

      Result:
      Depending on the browser & environment, you either get a blank page that cannot be saved or a turning wheel at the macro position (page still cannot be saved).

      Log shows the following error:

      2015-08-03 09:16:30,120 ERROR [ajp-nio-192.168.2.188-8009-exec-9] [schb.local].[/confluence].[servlet-module-container-servlet]] log Servlet.service() for servlet [servlet-module-container-servlet] in context with path [/confluence] threw exception
      java.lang.IllegalArgumentException: Name cannot be null
      	at com.atlassian.confluence.xhtml.api.MacroDefinition.<init>(MacroDefinition.java:73)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            160e57dc4064 Jan-Peter Rusch
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: