Skip to content
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

CookieParam is not correctly handled by the default Resteasy Reactive converter #28453

Closed
sberyozkin opened this issue Oct 7, 2022 · 5 comments · Fixed by #28464
Closed

CookieParam is not correctly handled by the default Resteasy Reactive converter #28453

sberyozkin opened this issue Oct 7, 2022 · 5 comments · Fixed by #28464
Assignees
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@sberyozkin
Copy link
Member

Describe the bug

If I have @CookieParam("csrftoken") Cookie token then Cookie token will have its name set to the value of the csrftoken cookie and the value will remain empty.

I'm sorry if I got it wrong, but after tracing the request and debugging the test endpoint it does look like the case.

Expected behavior

Given @CookieParam("csrftoken") Cookie token, the Cookie name should be set to csrftoken, and value to the actual cookie value

Actual behavior

No response

How to Reproduce?

Check out #28383, go to integration-tests/csrf-reactive, do mvn test -Dtest=CsrfReactiveTest#testCsrfTokenMultipart, have a breakpoint in TestResource#postCsrfTokenMulltipart to confirm

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@sberyozkin sberyozkin added the kind/bug Something isn't working label Oct 7, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 7, 2022

/cc @FroMage, @geoand, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Oct 10, 2022

#28464 takes care of the issue. Seems weird that we never encountered a case of using Cookie in a JAX-RS method...

@sberyozkin
Copy link
Member Author

Yeah, interesting, I suppose it shows manually dealing with cookies is done rarely

@geoand
Copy link
Contributor

geoand commented Oct 10, 2022

Very likely!

geoand added a commit that referenced this issue Oct 10, 2022
Ensure that JAX-RS Cookie parameter type is usable in Resource methods
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 10, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.2.Final Oct 10, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Oct 10, 2022
@FroMage
Copy link
Member

FroMage commented Oct 12, 2022

Well, cookies work, but they're usually deserialised to String ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants