microsoft / restler-fuzzer

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.
MIT License
2.52k stars 284 forks source link

restler_custom_payload is not correctly plugged into examples #787

Closed marina-p closed 11 months ago

marina-p commented 12 months ago

Description

The get_original_blocks function is not always taking custom payloads into account.

For example, any time the payload is generated from the grammar.json schema, an integer custom payload is not plugged in.

Steps to reproduce

Add an example config file to demo_server, and add a custom payload for the integer "id":

  "restler_custom_payload": {
    "id": [
      "12345"
    ]
}
{
    "paths": {
        "/api/blog/posts": {
            "POST": {
                "1": {
                    "parameters": {
                        "__body__": {
                            "id": 10000,
                            "body": "example body"

                        }
                    }
                }
            }
        }
    }
}

Expected results

id is always set to 10000

Actual results

id is not always substituted

Environment details

No response