Confluence page title with forward slash can lead to System Error

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 2

      Problem

      Accessing page information can lead to System Error if the page links other pages.

      Environment

      Confluence 7.19.x

      Steps to Reproduce

      1. Create a Confluence page with title 2024/9/9 break link.
      2. Create another page with title Broken PI containing a link to the page created in the previous step.
      3. Attempt to display Page Information for the page Broken PI.

      Expected Results

      • Page information are displayed.

      Actual Results

      System Error page is presented

      Confluence application logs shown the following exception:

      202X-0X-1X 09:09:18,857 ERROR [https-jsse-nio2-8443-exec-137 url: /pages/viewinfo.action; user: 100579XX] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/pages/viewinfo.vm'
       -- url: /pages/viewinfo.action | page: 1297753XXX | traceId: 96146f6da06YYYY | userName: 100579XX | referer: https://confluence.gemalto.com/pages/viewpage.action?pageId=1297753XXX | action: viewinfo
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getOutgoingLinks' in  class com.atlassian.confluence.pages.actions.PageInfoAction threw exception java.lang.NumberFormatException: For input string: "27 - otaaas - COTA Upgrade 7.13.7" at /pages/viewinfo.vm[line 323, column 39]
      	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:228)
      [...]
      Caused by: java.lang.NumberFormatException: For input string: "9 break link"
      	at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
      	at java.base/java.lang.Integer.parseInt(Unknown Source)
      	at java.base/java.lang.Integer.parseInt(Unknown Source)
      	at com.atlassian.confluence.links.linktypes.BlogPostLink.dayAsString(BlogPostLink.java:105)
      	at com.atlassian.confluence.links.linktypes.BlogPostLink.setUrlAndTitleForDateView(BlogPostLink.java:60)
      

      Workaround

      Remove the forward slash chars from the page title. In the example above, change the title to 2024-9-9 break link

      Notes

            Assignee:
            Pille Saral
            Reporter:
            Marco Salvi
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: