RV_group_create and RV_dataset_create send the name of the new group/dataset as JSON in the POST body. If the name contained a legal HDF5 name character that is a control character in JSON (e.g. \), the group/dataset would be created with an incorrect name. Now, a helper function encodes the name before adding it to the request body.
This is tested by test_url_encoding in test_rest_vol.c. With versions of HSDS before HDFGroup/HSDS#296, HSDS erroneously truncates the name url_encoding_group !*'():@&=+$,?#[]-.<>\^`{}|~ to url_encoding_group !*'():@&=+$, , so the behavior with the JSON control character \ was not being tested.
RV_group_create
andRV_dataset_create
send the name of the new group/dataset as JSON in the POST body. If the name contained a legal HDF5 name character that is a control character in JSON (e.g.\
), the group/dataset would be created with an incorrect name. Now, a helper function encodes the name before adding it to the request body.This is tested by
test_url_encoding
intest_rest_vol.c
. With versions of HSDS before HDFGroup/HSDS#296, HSDS erroneously truncates the nameurl_encoding_group !*'():@&=+$,?#[]-.<>\^`{}|~
tourl_encoding_group !*'():@&=+$,
, so the behavior with the JSON control character\
was not being tested.