Vert.x Web 5.2
Last reviewed Oct 25, 2026
Prompt Details
Prompt Composition
2prompts
- Java 21124 lines · 3.9K tokens
- Vert.x Web 5.259 lines · 3.1K tokens
Total183 lines · 6.9K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 117
- 190
- 197
- 201
- 208
- 209
- 295
- 297
- 306
- 307
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 384
- 409
- 427
- 459
- 470
- 471
- 488
- 489
- 494
- 502
- 524
- 532
- 552
- 601
- 611
- 613
- 614
- 650
- 653
- 732
- 759
- 770
- 772
- 776
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1004
- 1021
- 1275
- 1333
Prompt Preview
Apply the Java 21 prompt first. Target Vert.x Web 5.2 on JDK 21; these rules were checked against 5.2.2. Vert.x 5 supports Java 11 as its minimum, while virtual-thread features need Java 21. Apply optional Web Client, SockJS, and other module rules when those components are used.
Routing and request trust
- Put
SessionHandler,CorsHandler, andBodyHandlerin their required platform phases, then tenant selection and authentication,CSRFHandler,AuthorizationHandler, and business handlers in the security and application phases. Keepio.vertx.web.router.setup.lenientdisabled so invalid per-route ordering fails startup; inspect ordering across separate routes,Route.order(...), and mounted sub-routers too. - Match protected routes on explicit methods and paths. Call
RoutingContext.next()only after the current check succeeds, and terminate failures without passing to a weaker fallback route. Keep path normalization enabled and useRoutingContext.normalizedPath()for authorization and file mapping instead of the raw request path. - Treat
RoutingContext.reroute(...)as a new operation to authorize: it retains context, can change the method, and visited handlers such as body and CSRF handlers may not run again. KeepHttpMethod.QUERYread-only; it accepts a body in this line, butCSRFHandlerdoes not validate QUERY, so reject it for cookie-authenticated mutations. - Validate route parameters and parsed bodies before domain use.
Route.consumes(...)and an OpenAPI route match constrain media type or shape, not ownership or authorization. Reject