Skip to content

Creating user with username L. Kiesow fails #776

Open

Description

@lkiesow

Looks like the URLs are not encoded properly:

Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 39: http://localhost:8080/admin-ng/users/L. Kiesow.json                                                                                                     
        at java.net.URI.create(URI.java:883) ~[?:?]                                                                                                                                                                                           
        at org.opencastproject.util.UrlSupport.uri(UrlSupport.java:174) ~[?:?]                                                                                                                                                                
        at org.opencastproject.adminui.endpoint.UsersEndpoint.createUser(UsersEndpoint.java:360) ~[?:?]

Activity

  1. dennis531 commented on Jul 2, 2024

    @dennis531
    Contributor

    The post request parameters to /admin-ng/users look good:

    {
    	"username": "test1+test1",
    	"name": "Test+2",
    	"email": "debenz@uos.de",
    	"password": "123",
    	"roles": "[]"
    }
    

    This seems like an Opencast bug as the parameter will be created by the URLSearchParams class which already encodes the values. Encoding the username with encodeURIComponent leads to the following problem:

    image

    In this case, I need to login with the username Test%20Test.

  2. mtneug commented on Jul 2, 2024

    @mtneug
    Member

    Do we want usernames with whitespaces? Are people doing this 😱?

  3. lkiesow commented on May 5, 2025

    @lkiesow
    MemberAuthor

    No, I think we don't want that :D
    We should limit frontend and backend to:

    [0-9a-z_-:][0-9a-z_-:]*
    
  4. mtneug commented on May 5, 2025

    @mtneug
    Member

    No, I think we don't want that :D We should limit frontend and backend to:

    [0-9a-z_-:][0-9a-z_-:]*
    

    Please don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions