Questions for Confluence throws error add Topic with Special Characters when creating a new question

XMLWordPrintable

    • 8
    • Severity 3 - Minor
    • 1

      Summary

      Questions for Confluence throws error add Topic with Special Characters when creating a new question

      Environment

      Confluencne 6.6.0
      Questions for Confluence 2.5.4

      Steps to Reproduce

      1. Install Questions for Confluence from Marketplace
      2. Go to the Questions tab, try to Ask a new quetion
      3. Enter any Question title and the body
      4. Under the Topic field, enter a new topic with Special Characters in it
        • For example: d&a
      5. Click Save

      Expected Results

      1. A new question is posted

      Actual Results

      1. the Oops - an error has occurred is shown with the stack trace of errors:
        java.lang.IllegalArgumentException: Invalid label 'd&a'
        	at com.atlassian.confluence.labels.DefaultLabelManager.validateLabel(DefaultLabelManager.java:720)
        	at com.atlassian.confluence.labels.DefaultLabelManager.addLabel(DefaultLabelManager.java:78)
        	at com.atlassian.confluence.labels.CachingLabelManager.addLabel(CachingLabelManager.java:86)
        	at sun.reflect.GeneratedMethodAccessor1344.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        ...
        

        similar error shows in atlassian-confluence.log as well:

        2018-02-01 14:50:53,891 ERROR [http-nio-8090-exec-4] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
         -- referer: http://10.60.3.46:8090/confluence/questions/ask?title= | url: /confluence/cq/doaskquestion.action | traceId: 138fb680f7c41dc1 | userName: admin
        java.lang.IllegalArgumentException: Invalid label 'd&a'
                at com.atlassian.confluence.labels.DefaultLabelManager.validateLabel(DefaultLabelManager.java:720)
                at com.atlassian.confluence.labels.DefaultLabelManager.addLabel(DefaultLabelManager.java:78)
                at com.atlassian.confluence.labels.CachingLabelManager.addLabel(CachingLabelManager.java:86)
                at sun.reflect.GeneratedMethodAccessor1344.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        ...
        

      Note

      This will cause the user to lost all of the details that they have typed in the body field in the previous page.

            Assignee:
            Unassigned
            Reporter:
            Damien Tan
            Votes:
            18 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: