Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21807

Prevent user workspace collision when two users have the same sanitized name

    XMLWordPrintable

    Details

      Description

      User names are sanitized using the method IdUtils.generateId before being used to create the user workspace. This could cause problem when we follow this scenario:

      1. Create a user with username some@user
        • Result: The user is created, and its workspace is at path /default-domain/UserWorkspaces/some-user.
      2. Create a second user with username some-user.
        • Result: The user is created, but without a workspace, as the path /default-domain/UserWorkspaces/some-user is taken.

      NXP-19103 has started to work on user workspace creation collision but is only effective when the user name length is greater than the max segment size.


      We now generate the user workspace name based on the user id with no possible collision, using an escaping mechanism that escapes the few unwanted characters in paths and URLS (slash, backslash, ?, &, @, ; ) using a ~ and an hex code. If a user workspace was created previously, it will still be recognized and used; this applies only to new user workspaces.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h