`parse_owner()` relies on `rgw::account::validate_id()` to disambiguate
between user ids and account ids. reject attempts to create a user with
an ambiguous user id
Fixes: https://tracker.ceph.com/issues/69043
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
5378cfe3c5bf5953b53beee42975d045759238b1)
user_info.display_name = display_name;
user_info.type = TYPE_RGW;
- // tenant must not look like a valid account id
+ // user/tenant must not look like a valid account id
+ if (rgw::account::validate_id(uid.id)) {
+ set_err_msg(err_msg, "uid must not be formatted as an account id");
+ return -EINVAL;
+ }
if (rgw::account::validate_id(uid.tenant)) {
set_err_msg(err_msg, "tenant must not be formatted as an account id");
return -EINVAL;