Project

General

Profile

action #64412

Get rid of eval in OpenQA::WebAPI::Plugin::HashedParams

Added by tinita over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2020-03-11
Due date:
% Done:

0%

Estimated time:
Difficulty:

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

  1. The code could probably be replaced without eval, so we wouldn't need to clean the input.
  2. The Table API endpoints could also be changed to accept JSON instead, and we could get rid of the whole module.

History

#1 Updated by tinita over 1 year ago

  • Description updated (diff)

#2 Updated by okurz over 1 year ago

  • Priority changed from Normal to Low

Also available in: Atom PDF