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

Properly handle opaque origin ("null") in CORS processing #8537

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Mar 22, 2024

Description

Resolves #8497

If a browser (or other client) that can participate in CORS detects an untrusted origin, it can/might/must send the "opaque" origin (seemingly universally the string null) as the Origin header.

The Helidon CORS logic did not handle this case. "Usual" origins have scheme://host[:port] so have at least one colon which terminates the scheme. The code expected this but null has no colon.

Includes a new test.

Documentation

No impact.

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
@tjquinno tjquinno self-assigned this Mar 22, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 22, 2024
@tjquinno tjquinno requested a review from spericas March 22, 2024 21:12
@tjquinno tjquinno changed the title Add logic to detect opaque origin and treat as normal (not CORS) request Properly handle opaque origin ("null") Mar 22, 2024
@tjquinno tjquinno changed the title Properly handle opaque origin ("null") Properly handle opaque origin ("null") in CORS processing Mar 22, 2024
@tjquinno tjquinno merged commit 5730a16 into helidon-io:main Mar 25, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CORS "Internal exception in JAX-RS processing" with "null" Origin
2 participants