Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1958

Off-by-one when translating the token scope in OAuth2TokenHandler#listToString()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0-update1
    • 2.5.1
    • Java
    • None

    Description

      I've started to use OAuth scopes in our application, unfortunately shindig currently has an issue with that:

      SEVERE: Servlet.service() for servlet [OAuth2Servlet] in context with path [/api] threw exception [java.lang.StringIndexOutOfBoundsException: String index out of range: 34] with root cause
      java.lang.StringIndexOutOfBoundsException: String index out of range: 34
      	at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:762)
      	at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:258)
      	at org.apache.shindig.social.core.oauth2.OAuth2TokenHandler.listToString(OAuth2TokenHandler.java:94)
      	at org.apache.shindig.social.core.oauth2.OAuth2TokenHandler.handle(OAuth2TokenHandler.java:73)
      	at org.apache.shindig.social.core.oauth2.OAuth2Servlet.doGet(OAuth2Servlet.java:71)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      

      Attachments

        Activity

          People

            ankon Andreas Kohn
            ankon Andreas Kohn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: