Invalid JSON-Data Value
naveenn2n opened this issue · comments
After utilizing fuzzer, am getting invalid json data value. While passing the
fuzzer.py: error: argument --headers: invalid json_data value: '[{Authorization:'
Constructed payload.
python fuzzer.py -s test/swagger.json -u http://muurl --headers [{"Authorization": "Placed Valid Token"}] -r /tmp/reports/ --log debug
Due to privacy issues, haven't pasted url and token.
hi what about --headers '[{"Authorization": "Placed Valid Token"}]' with ' around the value?
I assume value after space is recognised as different argument.
Hi Kiss,
I tried different way of passing. Removing spaces, Single quotes, Doubles Quotes etc., But getting same error everytime.
Hi,
I've added tests to cover this functionality, seems working. Maybe it is cauased by your environment.
Please do the following
- clone the master branch of this repository
- Install requirements: sudo pip3 install -r requirements.txt
- Install the test requirements: sudo pip3 install -r test/requirements_for_test.txt
- Start the test application in a dedicated terminal: python3 test/test_application.py
- Execute this: python3 fuzzer.py -h
- Copy the Auth header example from the help
- Execute this: python3 fuzzer.py --src_url https://raw.githubusercontent.com/swagger-api/swagger-samples/master/java/inflector-dropwizard-guice/src/main/swagger/swagger.yaml -u http://127.0.0.1:5000/ --headers '[{"Authorization": "SuperSecret"}, {"Auth2": "asd"}]'
- Copy the console output here
- If fails, please execute this: pytest -x --show-capture=stdout -vv -rP test while the test application still runs
Thanks @KissPeter. It's working fine.