zvmsdk-wsgi validation of query methods validate the wrong parameters

Bug #1747584 reported by cao biao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
Confirmed
Low
cao biao

Bug Description

in validation/__init__.py:
this function:
if _schema_validation_helper(query_params_schema,
                             req.GET.dict_of_lists(),
                             args, kwargs, is_body=False)
the second parameter should be args[2] not req.GET.dict_of_lists()
because the args[index](index to be determined, maybe fixed) is exactly the data we processed in handlers, just like 'userid_list' in following case:

@validation.query_schema(guest.userid_list_array_query)
    def inspect_stats(self, req, userid_list):
        info = self.client.send_request('guest_inspect_stats',
                                        userid_list)
        return info

and req.GET.dict_of_lists() are data passed from url, the value would be very weird.

This problem may effect every validation case of all the query methods.

cao biao (flytiger)
Changed in python-zvm-sdk:
assignee: nobody → cao biao (flytiger)
Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
status: New → Confirmed
importance: Undecided → Low
cao biao (flytiger)
summary: - zvmsdk-wsgi validation cannot validate the parameters processed
+ zvmsdk-wsgi validation cannot validate the wrong parameters
summary: - zvmsdk-wsgi validation cannot validate the wrong parameters
+ zvmsdk-wsgi validation validate the wrong parameters
summary: - zvmsdk-wsgi validation validate the wrong parameters
+ zvmsdk-wsgi validation of query methods validate the wrong parameters
Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
milestone: none → future
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.