-
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
Allow CORS same origin requests #29626
Conversation
1df70c5
to
406e37d
Compare
This comment has been minimized.
This comment has been minimized.
Also clean up the slow path
406e37d
to
2ce7349
Compare
This comment has been minimized.
This comment has been minimized.
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.
Thanks @stuartwdouglas, it does look like it will offer a more optimal way of comparing Origin and the request URI, and if necessary, we can follow up with adding a flag making the same origin check optional
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.
-1 on blindly allowing same origin hosts by default. You are basically trusting the client to speak the truth allowing to trick Quarkus into accept from any host name (not just localhost) which is problematic.
we should check what other fwks do here - the only reason it worked before was due to another CORS filter bug.
That is the point. CORS is intended to prevent trusted clients (i.e. browsers implementing the web security model) from being tricked by a malicious site into sending requests to other sites. If the client is compromised then CORS is useless, the client can send any origin it wants so no matter what is configured the client can send something that would be expected. This type of issue is prevented by requiring authentication. |
Re-opening for another round of reviews |
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.
+1 after reviewing and discussion on enabling same origin even when additional hosts specified for cors.
Thanks @stuartwdouglas @maxandersen |
No description provided.