mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
related to https://github.com/fleetdm/fleet/issues/7199, this adds email validation to the `verifyCreateShared` which is used for user creation in the server. validation messages come directly from Go's `net/mail` package. ``` ~/fleet $ curl 'https://localhost:8080/api/latest/fleet/users/admin' -X POST -H 'Authorization: Bearer $TOKEN' --data-raw '{"email":"asdf","name":"asdf@asd.com","password":"as;lkdfjasdlk;fja3234@","global_role":"observer","teams":[]}' { "message": "Validation Failed", "errors": [ { "name": "email", "reason": "mail: missing '@' or angle-addr" } ] } ```
1 line
46 B
Text
1 line
46 B
Text
* Added server-side validation of user emails
|