Skip to content

Commit

Permalink
Disallow user_value to be anything but an object
Browse files Browse the repository at this point in the history
  • Loading branch information
srh committed Mar 21, 2020
1 parent 8e89230 commit de5d96e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/clustering/administration/tables/table_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ bool convert_table_config_and_name_from_datum(
if (!converter.get("user_value", &user_value_datum, error_out)) {
return false;
}
if (user_value_datum.get_type() != ql::datum_t::R_OBJECT) {
error_out->msg = "The `user_value` field must contain an object.";
return false;
}

config_out->user_value = {std::move(user_value_datum)};
} else {
config_out->user_value = default_user_value();
Expand Down

0 comments on commit de5d96e

Please sign in to comment.