-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix parameter validation issue in classic rest-client #33918
Fix parameter validation issue in classic rest-client #33918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the same test in the REST Client Reactive extension?
I could not confirm that after these changes, the reproducer in the linked issue behaved the same in the classic and the reactive REST clients.
@Sgitario I added a test for rest-client-reactive as requested. Please take another look when you have a chance. |
This comment has been minimized.
This comment has been minimized.
Many thanks! You need to build the modules you changed using Maven, so the files get formatted, ( |
URL parsing inside of `QuarkusRestClientBuilder.verifyInterface` used `ResteasyUriBuilderImpl.uri`, which works for most cases, but parsed in subtly wrong ways when the constructed path started with `//`. For example, a path of `//{id}` parses `{id}` as the hostname. Such a path was possible to trigger by a couple of scenarios: 1. Interface has `@Path("")`, and a method-level `@Path` value starting with `/`. 2. Interface has `@Path("/")`, and a method-level `@Path` value not starting with `/`. Furthermore, if the first path component contained a path param, then it would not be counted, leading to incorrect validation results. Added an empty path test to rest-client-reactive.
d0f6637
to
8c0e055
Compare
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
Great, many thanks! |
URL parsing inside of
QuarkusRestClientBuilder.verifyInterface
usedResteasyUriBuilderImpl.uri
, which works for most cases, but parsed in subtly wrong ways when the constructed path started with//
. For example, a path of//{id}
parses{id}
as the hostname. Such a path was possible to trigger by a couple of scenarios:@Path("")
, and a method-level@Path
value starting with/
.@Path("/")
, and a method-level@Path
value not starting with/
.Furthermore, if the first path component contained a path param, then it would not be counted, leading to incorrect validation results.
Fixes: #33915