Skip to content

CORS filter throws 500 on invalid Origin URL #48823

@blazmrak

Description

@blazmrak

This popped up on our production and is caused by random bots. You can reproduce by sending a request with invalid URL in the Origin header. It should maybe be a 4xx.

curl -H 'Origin: https://%s' url

The code responsible is here: https://github.com/quarkusio/quarkus/blame/6241ec356a30d1eaf674f5e931034a85599ae970/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/cors/CORSFilter.java#L254-L255

Should these two URI.create calls be wrapped in a try-catch block or is this behavior not worth changing?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions