Clarify raw vs normalized path usage in Vert.x Web routing documentation#2832
Merged
vietj merged 1 commit intovert-x3:masterfrom Jan 7, 2026
Merged
Conversation
fbc0698 to
da3b86d
Compare
…security-sensitive path checks Signed-off-by: MatthaiosStavrou <m_stauroy@hotmail.com>
da3b86d to
08176bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While investigating path aliasing and normalization behavior in Quarkus (which builds on Vert.x Web),
I noticed that developers occasionally assume that
HttpServerRequest#path()returns a normalizedpath. In reality, this method exposes the raw request path as sent by the client, which may contain
segments such as
.., repeated slashes, or other forms that are not suitable for security-sensitivedecisions.
Vert.x Web performs route matching using a normalized version of the request path. This value is
available through
RoutingContext#normalizedPath(). However, the current Vert.x Web documentationdoes not clearly communicate the relationship between the raw path and the normalized path, which can
lead to:
What this PR does
This PR updates the Vert.x Web documentation to:
HttpServerRequest#path()(raw path) andRoutingContext#normalizedPath()(normalized route path),normalizedPath()for security-sensitive comparisons,/secured/../secured/datamayresolve to the same route while having a different raw path.
Why this matters
Even though Vert.x routing correctly applies normalization internally, developers implementing custom
security checks, auditing, or path-based authorization may incorrectly rely on the raw path. Documenting
this distinction helps avoid subtle bugs and aligns expectations with the router's behavior.
Related discussion
This change originated from an analysis performed while contributing to Quarkus:
quarkusio/quarkus#51186
A related Vert.x Core tracking issue has been opened here:
#2831
Summary
This documentation improvement ensures developers understand when to use the raw request path and
when to use the normalized path, preventing confusion and reducing the risk of incorrect path-based
security logic.