-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check username for allowed characters when new user is created #1585
Comments
it is also possible to create a user POST http://localhost:3333/admin/users {
"email": "[email protected]",
"givenName": "Donald",
"familyName": "Duck",
"username": "donald-duck",
"password": "test",
"status": true,
"lang": "en",
"systemAdmin": false
} returns: {
"user": {
"email": "[email protected]",
"familyName": "Duck",
"givenName": "Donald",
"groups": [],
"id": "http://rdfh.ch/users/mCjxMQ4xQuq12LjaS7qXTQ",
"lang": "en",
"password": null,
"permissions": {
"administrativePermissionsPerProject": {},
"groupsPerProject": {}
},
"projects": [],
"sessionId": null,
"status": true,
"token": null,
"username": "donald-duck"
}
} but then the query: GET http://localhost:3333/admin/users/username/donald-duck returns: {
"error": "org.knora.webapi.BadRequestException: Invalid username Some(donald-duck)"
} |
@loicjaouen see rules given in original issue by @subotic #1573 (comment) |
@loicjaouen Thanks for reporting. Did you try it against the linked PR branch? |
I've added a test for I've also added validation checks for when an existing |
Creating a user with
"username": "[email protected]"
should not be possible.The text was updated successfully, but these errors were encountered: