Actions
action #64412
openGet rid of eval in OpenQA::WebAPI::Plugin::HashedParams
Start date:
2020-03-11
Due date:
% Done:
0%
Estimated time:
Description
Problem¶
This plugin is a helper to receive nested data structures, as it can turn query parameters like
"settings[FOO][BAR]=baz"
into a data structure.
It is used only in the OpenQA::WebAPI::Controller::API::V1::Table
.
The code removes unsafe characters and creates perl code which is then loaded with eval
.
Suggestion¶
- The code could probably be replaced without
eval
, so we wouldn't need to clean the input. - The Table API endpoints could also be changed to accept JSON instead, and we could get rid of the whole module.
Actions