Comments (6)
Can you please double chech if tenants.yml (reduced) generates this error? I tried with the latest version several times, but didn't see the error.
Thanks
from apifuzzer.
Yes, the reduced file of tenants.xml works fine. I get that error when running it on the main.xml file
APIFuzzer -s main.xml
However, the full version gives me a recursion error. I'll create a new issue when I can create a reduced file with the error.
from apifuzzer.
I thought the reduced API is for me. Can you please test if the issue still exists with the new APIFuzzer version?
from apifuzzer.
Running with the new version, I get these error logs:
jordi@DESKTOP-NISTS11:/mnt/c/dev/workspace/saas-api/openapi$ APIFuzzer -s main.yml -u 192.168.1.34:8080 --headers '[{"Authorization": "Bearer ..."}]'
209 [ ERROR] APIFuzzer: Exception: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/mnt/c/dev/workspace/APIFuzzer/apifuzzer/fuzzer.py", line 45, in prepare
template_generator.process_api_resources()
File "/mnt/c/dev/workspace/APIFuzzer/apifuzzer/openapi_template_generator.py", line 109, in process_api_resources
self._process_request_body()
File "/mnt/c/dev/workspace/APIFuzzer/apifuzzer/openapi_template_generator.py", line 123, in _process_request_body
paths[resource][method].get("requestBody", {}).get("content", [])
AttributeError: 'list' object has no attribute 'get'
Unexpected exception happened during fuzz test preparation: 'list' object has no attribute 'get'. Feel free to report the issue
from apifuzzer.
After removed the following lines from the tenants.xml
" /v1/tenants/{tenantId}:
$ref: 'tenants.yml#/paths/1v11tenants~1%7BtenantId%7D"
The latest version started fuzzing.
The exception reports a strange thing:
"APIFuzzer/apifuzzer/openapi_template_generator.py", line 123, in _process_request_body
paths[resource][method].get("requestBody", {}).get("content", [])
AttributeError: 'list' object has no attribute 'get'"
either the method or the requestBody key is a list instead of the expected dict. Please make sure your API definiton is valid.
from apifuzzer.
I am not really sure if it is related so I decided to open a new bug report even if the error message is kind of the same. See #49
from apifuzzer.
Related Issues (20)
- Copy/paste error in compile_base_url()
- Unexpected exception happened during fuzz test preparation: 'schemes' HOT 2
- --version not valid HOT 2
- Path items with no variables prevent the fuzzer from running HOT 1
- Parameters on "Path Item" level is not getting accepted HOT 4
- Numbers in Unit XML wrong HOT 4
- Unexpected exception happened during fuzz test preparation: sequence item 0: expected str instance, list found.
- Report filenames start with -1 HOT 3
- Unexpected exception happened during fuzz test preparation HOT 1
- Payload generation from response data HOT 2
- APIFuzzer is failing for the CI integration HOT 4
- Space char at the headers argument HOT 4
- Api HOT 1
- Exception for max_length(0) < 0 for boolean fuzzer HOT 2
- Unable to install APIFuzzer HOT 2
- Unable to install using pip3
- request payload is having a boolean type in swagger documentation, but at the fuzzing time requests pass as string type
- How to use --header correctly? HOT 2
- How to use HTTPS? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apifuzzer.