-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 9.10-HF41, 10.10-HF23, 11.1, 2021.0
-
Component/s: User Profile / User Manager
-
Release Notes Summary:Personal workspace creation handles special characters.
-
Tags:
-
Backlog priority:550
-
Upgrade notes:
-
Sprint:nxplatform 11.1.28
-
Story Points:5
Steps to reproduce:
- Log in and go to the JSF UI
- Go to Admin > Users & Groups
- Click the "Create a New User" button
- Create a first user with username a-b and don't check the "Create another" box
- Click on the "Back to the List" button
- Click the "Create a New User" button
- Create a first user with username a_b
Now the following actions will fail:
- GET the path endpoint with the theoritical path of a_b workspace
http://localhost:8080/nuxeo/site/api/v1/path/default-domain/UserWorkspaces/a_b
returns a 404 error
{"entity-type":"exception","status":404,"message":"/default-domain/UserWorkspaces/a_b"}
- cURL command to get the user workspaces from the GetUserWorkspace' operation
curl -X POST 'http://localhost:8080/nuxeo/site/automation/User.GetUserWorkspace' -u a_b:password -H 'content-type: application/json' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' -d '{"params":{},"context":{}}'
=> returns the personal workspace for a-b
{"entity-type":"document","repository":"default","uid":"80172e2a-a9b2-4fed-86dc-e83510855485","path":"/default-domain/UserWorkspaces/a-b", ...
AbstractUserWorkspaceImpl#getCandidateUserWorkspaceNames produces the alternative names for the personal workpace
protected PathRef getExistingUserWorkspace(CoreSession session, PathRef rootref, Principal principal, String username) { PathRef freeRef = null; for (String name : getCandidateUserWorkspaceNames(username)) { PathRef ref = new PathRef(rootref, name); if (session.exists(ref) && session.hasPermission(session.getPrincipal(), ref, SecurityConstants.EVERYTHING)) { return ref; }
=> this permission check uses a "system" user
- causes
-
NXP-28841 Fix regression caused by NXP-26003
- Resolved
- Is referenced in