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

Label parser assumes label is present for user prefixes

    XMLWordPrintable

Details

    Description

      Not sure how long this goes back, but I found this bug while searching for a username in global search. Queries are parsed through the LabelParser to find matching labels.

      Offending code:

              else if(labelString.startsWith(USER_LABEL_PREFIX))
              {
                  int index = labelString.indexOf(NAMESPACE_DELIMITER);
                  userName = labelString.substring(1, index);
                  labelName = labelString.substring(index + 1);
                  prefix = PERSONAL_LABEL_PREFIX;
              }
      

      throws StringIndexOutOfBoundsException: String index out of range: -2 when there is no namespace delimiter (":")

      Attachments

        Issue Links

          Activity

            People

              cbroadfoot Chris Broadfoot [Atlassian]
              cbroadfoot Chris Broadfoot [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: