Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-15261

Users with spaces in their usernames can not create linked repositories

    XMLWordPrintable

Details

    Description

      steps to reproduce

      1. By default bamboo does not allow the creation of users with spaces in their usernames. Now if the user is created via LDAP, or crowd or JIRA, and authentication delegated to one of the mentioned methods, then the users are accepted
      2. In this particular test, I created a user with space in JIRA called "user space". This user can log in to both stash and bamboo and view their profiles. In Stash, the user can even have access to the repos.
      3. Now create an application link between bamboo and Stash
      4. Log in to bamboo as user "user space" and try to create a linked repos. It fails as per the screenshot below when we try to choose he repository. The following also appears in the logs:
        2014-11-24 23:29:56,338 ERROR [http-bio-1057-exec-7] [ThrowableExceptionMapper] Uncaught exception thrown by REST service: Illegal character in query at index 91: http://localhost:7340/stash3
        40/rest/api/1.0/repos?start=0&limit=10&xoauth_requestor_id=user space
        java.lang.IllegalArgumentException: Illegal character in query at index 91: http://localhost:7340/stash340/rest/api/1.0/repos?start=0&limit=10&xoauth_requestor_id=user space
                at java.net.URI.create(URI.java:859)
                at com.atlassian.sal.core.net.HttpClientProtocolConfig.changeHostConfigurationProtocol(HttpClientProtocolConfig.java:43)
                at com.atlassian.sal.core.net.HttpClientProtocolConfig.configureProtocol(HttpClientProtocolConfig.java:20)
                at com.atlassian.sal.core.net.HttpClientRequest.configureProtocol(HttpClientRequest.java:532)
                at com.atlassian.sal.core.net.HttpClientRequest.setUrl(HttpClientRequest.java:135)
                at com.atlassian.sal.core.net.HttpClientRequest.setUrl(HttpClientRequest.java:71)
                at com.atlassian.plugins.rest.module.jersey.JerseyRequest.setUrl(JerseyRequest.java:57)
                at com.atlassian.plugins.rest.module.jersey.JerseyRequest.setUrl(JerseyRequest.java:21)
                at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.setUrl(ApplicationLinkRequestAdaptor.java:134)
        .
        .
        .
        .
        .
        Caused by: java.net.URISyntaxException: Illegal character in query at index 91: http://localhost:7340/stash340/rest/api/1.0/repos?start=0&limit=10&xoauth_requestor_id=user space
                at java.net.URI$Parser.fail(URI.java:2829)
                at java.net.URI$Parser.checkChars(URI.java:3002)
                at java.net.URI$Parser.parseHierarchical(URI.java:3092)
                at java.net.URI$Parser.parse(URI.java:3034)
                at java.net.URI.<init>(URI.java:595)
                at java.net.URI.create(URI.java:857)
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smaiyaki Sultan Maiyaki (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: