ibutsu / ibutsu-server

Ibutsu is a test result aggregator
https://ibutsu-project.org
MIT License
17 stars 22 forks source link

Control sensitive fields better #491

Closed LightOfHeaven1994 closed 7 months ago

LightOfHeaven1994 commented 7 months ago

This is going to help us avoid backend failures with 500 as we didn't check what user put into some fields and python had issues with it. Example, when user put into group field incorrect value "component=foo", as the result backend fails as Run object doesn't have this attribute:

  File "/app/ibutsu_server/filters.py", line 84, in string_to_column
    column = getattr(model, field)
AttributeError: type object 'Run' has no attribute 'component=foo'

If there are some issues to find a column - we return None from string_to_column helper function. Then widgets that have this field mandatory will return empty data