APIKit v1.3.9
Mule Runtime 4.2.2
I have defined an API in RAML 1.0 with the following snippet:
/test:
get:
queryParameters:
name:
description: search by name
type: string
required: false
When I issue calls to the API for query parameters with only leading single- or double-quotation marks then APIKit rejects with 400 Bad Request. If the quotation mark is terminated elsewhere in the string, it is accepted. If the quotation mark appears in the middle of the string without termination, it is accepted.
400 Bad Request examples:
/test?name=%27
/test?name=%27test
/test?name=%27%20test
/test?name="
/test?name="test
/test?name="%20test
/test?name=@
/test?name=@test
/test?name=@%20test
200 OK examples:
/test?name=who%27s%20there
/test?name=%27test%27
/test?name=John%20"Jimbo"%20Devereaux
/test?name="test"
/test?name=%27%20
/test?name=%27%20%20%20%20
/test?name="%20
/test?name="%20%20%20%20
The rejected message is:
Invalid value ''test' for query parameter name. Syntax error in the following text: 'test'
Stack trace points to org.mule.module.apikit.validation.attributes.QueryParameterValidator.validate(QueryParameterValidator.java:142)
APIKit v1.3.9
Mule Runtime 4.2.2
I have defined an API in RAML 1.0 with the following snippet:
When I issue calls to the API for query parameters with only leading single- or double-quotation marks then APIKit rejects with 400 Bad Request. If the quotation mark is terminated elsewhere in the string, it is accepted. If the quotation mark appears in the middle of the string without termination, it is accepted.
400 Bad Request examples:
/test?name=%27
/test?name=%27test
/test?name=%27%20test
/test?name="
/test?name="test
/test?name="%20test
/test?name=@
/test?name=@test
/test?name=@%20test
200 OK examples:
/test?name=who%27s%20there
/test?name=%27test%27
/test?name=John%20"Jimbo"%20Devereaux
/test?name="test"
/test?name=%27%20
/test?name=%27%20%20%20%20
/test?name="%20
/test?name="%20%20%20%20
The rejected message is:
Invalid value ''test' for query parameter name. Syntax error in the following text: 'test'
Stack trace points to org.mule.module.apikit.validation.attributes.QueryParameterValidator.validate(QueryParameterValidator.java:142)