Skip to content

Commit 27fdfa4

Browse files
authored
URI encode user_upsert (#700)
1 parent a0d41a7 commit 27fdfa4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/operations/management/user_upsert.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ user_upsert_request::encode_to(encoded_request_type& encoded,
5151
for (const auto& role : user.roles) {
5252
std::string spec = role.name;
5353
if (role.bucket) {
54-
spec += fmt::format("[{}", role.bucket.value());
54+
spec += fmt::format("[{}", utils::string_codec::v2::path_escape(role.bucket.value()));
5555
if (role.scope) {
56-
spec += fmt::format(":{}", role.scope.value());
56+
spec += fmt::format(":{}", utils::string_codec::v2::path_escape(role.scope.value()));
5757
if (role.collection) {
58-
spec += fmt::format(":{}", role.collection.value());
58+
spec += fmt::format(":{}", utils::string_codec::v2::path_escape(role.collection.value()));
5959
}
6060
}
6161
spec += "]";

0 commit comments

Comments
 (0)