Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-valuable data is propagated through request sequences #65

Open
AlexB1986 opened this issue Dec 7, 2020 · 0 comments
Open

Non-valuable data is propagated through request sequences #65

AlexB1986 opened this issue Dec 7, 2020 · 0 comments

Comments

@AlexB1986
Copy link

Hi Team!
While testing Fuzz-lightyear against Mozilla Kinto we have faced with issue related with propagating non-valuable data through request sequences.
Could you please check our results?

While generating a sequence of requests method add_response() called with some response as an input:
image

To extract data add_response() use for loop with dir(response).
But in that case dir(response) equals to

['__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']

As a result we have non-valuable data in self.data (this data is used to construct nest request in a sequence):
image

Seems that we should use response.keys() instead of dir(response):

....
for key in response.keys():
    self.data[key] = response[key]
...

Do we miss something in our reasoning? Are there any cases when dir(response) is needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant