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

Notifications REST URL is badly computed and can be broken in some conditions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.10-rc-1, 10.8.2
    • 10.8.1, 10.9
    • Notifications
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The current code does:

      var restURL = xm.restURL.substring(0, xm.restURL.indexOf('/rest/')) + '/rest/notifications?media=json'; 

      This is not clean at all.
      A correct way to do it would be

      var restURL = "${request.contextPath}/rest/notifications?media=json";
      

      (even if it requires velocity to parse the code, for which I have been criticized in the past)

      Attachments

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            gdelhumeau Guillaume Delhumeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: