-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Path parameters are not validated properly when they are encoded #17
Comments
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Apr 7, 2024
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Apr 7, 2024
Parameters should be unscaped before being sent for validation. gorillamux returns escaped parameters, but openapi3filter expects unescaped parameters.
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Apr 8, 2024
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Apr 8, 2024
Parameters should be unscaped before being sent for validation. gorillamux returns escaped parameters, but openapi3filter expects unescaped parameters.
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Jan 5, 2025
florentchauveau
added a commit
to florentchauveau/echo-middleware
that referenced
this issue
Jan 5, 2025
Parameters should be unscaped before being sent for validation. gorillamux returns escaped parameters, but openapi3filter expects unescaped parameters.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
For a simple spec like this one:
and an HTTP request to
/resource/%2B
, the validation fails, although it should not. It fails because parameters are given in their encoded form toopenapi3filter
. In this case, it passes%2B
for validation, and because it is longer than1
, it fails.It should pass
+
toopenapi3filter
.This is because
route, pathParams, err := router.FindRoute(req)
returns encodedpathParams
. It does so becausegorillamux.NewRouter(swagger)
usesmux.NewRouter().UseEncodedPath()
itself.I am working on a PR fixing this.
The text was updated successfully, but these errors were encountered: