Skip to content

Releases

javalin-parent-7.2.4

Choose a tag to compare

@tipsy tipsy released this 25 Oct 12:53

Highlights

This is mostly a security and bug-fix release. Many of the fixes were reported privately and fixed by @andrewstellman. Thank you!

Behavior changes

These fixes are correct, but they can change what existing apps see:

  • Static files: paths that are aliases of a static path (/%73ecret/…, //secret/…, /./secret/…) now return 404 instead of serving the file around a before("/secret/*") handler. With treatMultipleSlashesAsSingleSlash on, static paths containing // now return 404 too (#2665).
  • Static files: hostedPath is matched as a whole path segment, so hostedPath = "/assets" no longer serves /assetsX/… (#2672).
  • Routing: a HEAD request answered by a GET route now gets the GET route's roles, so it's rejected wherever the GET is (#2668).
  • BasicAuthPlugin: with no credentials configured, every request is now rejected. Previously every request was let through (#2666).
  • Uploads: UploadedFile.filename() returns only the last path segment, so ../../evil.txt becomes evil.txt (#2675).
  • Errors: HttpResponseException messages served as text/html are now HTML-escaped. Plain-text and JSON responses are unchanged (#2669).
  • WebSockets: closeSession() throws IllegalArgumentException for close codes that can't be sent, such as WsCloseStatus.RESERVED. Previously the session silently stayed open (#2680).
  • Validation: checks no longer run on a null value, so a check that isn't null-safe now returns 400 instead of a 500 from an NPE (#2647).

Additions

  • RateLimitPlugin.Config.exceptionFunction lets you choose which HttpResponseException is thrown when a limit is exceeded, for example TooManyRequestsResponse. The default is unchanged (#2651).
  • ContentType.APPLICATION_PROBLEM_JSON and ContentType.APPLICATION_PROBLEM_XML, plus ContentType.PROBLEM_JSON and ContentType.PROBLEM_XML as plain strings (#2640).

Also in this release (missing from the list below)

  • [content-type] Restore the application/xml lookup to APPLICATION_POM by @alexjameszhang in #2636
  • [http] Add problem+json and problem+xml content types by @alexjameszhang in #2640
  • [static-files] Fix precompressed-file bugs in the Jetty resource handler (219f8c1)
  • [seekablewriter] Fix an infinite loop on non-skippable streams, and EOF handling (ec457ef)
  • [websocket] Disable automatic pings on the error path (0fdafc3)

Dependencies

Jetty 12.1.14, Jackson 2.22.4 / 3.2.4, SLF4J 2.0.20, Micrometer 1.17.2, ayza 10.1.0 (SSL plugin), and patch updates for the template engines (FreeMarker 2.3.35, Handlebars 4.5.5, JTE 3.2.4, CommonMark 0.31.0). No major-version upgrades.

What's Changed

  • [github] Clean up stale docs and CI/dependabot config by @tipsy in #2626
  • [handlebars] Preserve render API with upgraded loader by @paulrene in #2623
  • [sse] Synchronize comment emit to prevent frame interleaving by @tipsy in #2629
  • [concurrency] Make internal executor threads daemon by @tipsy in #2630
  • [cookies] Don't leak a cookie's SameSite onto other cookies by @tipsy in #2631
  • [websocket] Fix ineffective lock in automatic-ping manager by @tipsy in #2632
  • [deps] Read OptionalDependency versions from the pom by @tipsy in #2633
  • [workflow]: Bump actions/setup-java from 5 to 6 in the dependencies group by @dependabot[bot] in #2643
  • [deps]: Bump the production-dependencies group with 17 updates by @dependabot[bot] in #2644
  • [deps]: Bump org.seleniumhq.selenium:selenium-chrome-driver from 4.46.0 to 4.48.0 in the development-dependencies group across 1 directory by @dependabot[bot] in #2646
  • [jetty] Make JettyServer.started atomic and visible across threads by @kalayciburak in #2641
  • [static-files] Send Content-Length for streamed static files by @tipsy in #2648
  • [validation] Don't run checks on a null value by @tipsy in #2647
  • [workflow]: Bump codecov/codecov-action from 7.0.0 to 7.1.1 in the dependencies group by @dependabot[bot] in #2653
  • [static-files] Do not serve a static file through an alias of its path by @andrewstellman in #2665
  • [plugins] BasicAuthPlugin: reject every request when no credentials are configured by @andrewstellman in #2666
  • [routing] Apply the GET route's roles to a HEAD request it answers by @andrewstellman in #2668
  • [http] HTML-escape HttpResponseException messages served as text/html by @andrewstellman in #2669
  • [sse] Treat a carriage return as a line terminator in SSE comments by @andrewstellman in #2670
  • [plugins] Keep the context path in lowercase-path redirects by @andrewstellman in #2660
  • [context] Accept the Basic auth scheme name case-insensitively by @andrewstellman in #2671
  • [static-files] Match hostedPath as a whole path segment by @andrewstellman in #2672
  • [websocket] Don't create an HTTP session when snapshotting an upgrade request by @andrewstellman in #2674
  • [context] Strip directory components from uploaded file names by @andrewstellman in #2675
  • [static-files] Key the Jetty precompression cache by file by @andrewstellman in #2673
  • [deps] Bump minor and patch versions of dependencies and plugins by @tipsy in #2676
  • [ci] Fix invalid secrets check in the performance preview cleanup workflow by @elgamal-ahmed in #2656
  • Add configurable rate limit exception by @elgamal-ahmed in #2651
  • [ci] Run performance preview cleanup on pull_request_target so fork PRs are cleaned up by @tipsy in #2677
  • [websocket] Reject close codes that can't be sent in closeSession() by @tipsy in #2680
  • [sse] Close keepAlive clients when the async request errors by @tipsy in #2679

New Contributors

Full Changelog: javalin-parent-7.2.3...javalin-parent-7.2.4

7.2.3

Choose a tag to compare

@tipsy tipsy released this 13 Aug 15:40

What's Changed

  • [workflow]: Bump codecov/codecov-action from 6.0.0 to 6.0.1 in the dependencies group by @dependabot[bot] in #2597
  • [deps] Bump grouped dependencies (excluding Jetty) by @tipsy in #2604
  • Add default enum converters for validation by @tipsy with @Copilot in #2600
  • Add Context.addHeader method by @tipsy with @Copilot in #2605
  • [workflow]: Bump codecov/codecov-action from 6.0.1 to 7.0.0 in the dependencies group by @dependabot[bot] in #2606
  • [http] Return 404 for unrecognized request methods instead of 500 by @tipsy in #2609
  • [workflow]: Bump the dependencies group across 1 directory with 2 updates by @dependabot[bot] in #2612
  • Stream static files instead of reading all bytes into memory by @tipsy with @Copilot in #2618
  • Add application/xml to ContentType by @tipsy with @Copilot in #2619
  • [deps]: Bump the dependencies group across 1 directory with 32 updates by @dependabot[bot] in #2617
  • [deps] Bump stable deps and sync OptionalDependency.kt by @tipsy in #2624

Full Changelog: javalin-parent-7.2.1...javalin-parent-7.2.3

7.2.2

Choose a tag to compare

@tipsy tipsy released this 14 May 20:34

What's Changed

  • [build] Bump Maven Wrapper to 3.9.15 by @tipsy in #2590
  • [deps]: Bump the dependencies group with 12 updates by @dependabot[bot] in #2589
  • Fix DevLoggingPlugin websocket query-parameter handling by @Copilot in #2595

Full Changelog: javalin-parent-7.2.0...javalin-parent-7.2.2

7.2.1

7.2.1 Pre-release
Pre-release

Choose a tag to compare

@tipsy tipsy released this 14 May 20:35

⚠️ Unstable release containing a version of Jetty which has a bug. Use 7.2.2 instead.

7.2.0

Choose a tag to compare

@tipsy tipsy released this 19 Apr 17:45

What's Changed

  • [performance] Replace Stream API with List and reduce per-request allocations by @tipsy in #2567
  • feat: introduce JavalinJackson3 as an optional JsonMapper implementation for Jackson 3 by @yvasyliev in #2548
  • [workflow]: Bump codecov/codecov-action from 5.5.2 to 5.5.3 in the dependencies group by @dependabot[bot] in #2569
  • Add path role inheritance by @AoElite in #2553
  • [deps]: Bump the dependencies group across 1 directory with 23 updates by @dependabot[bot] in #2575
  • [workflow]: Bump codecov/codecov-action from 5.5.3 to 6.0.0 in the dependencies group across 1 directory by @dependabot[bot] in #2570
  • [workflow]: Bump actions/github-script from 8 to 9 in the dependencies group by @dependabot[bot] in #2581
  • [cleanup] Remove JavalinTest.class by @vorburger in #2584
  • [deps] Bump Jetty from 12.1.7 to 12.1.8 by @vorburger in #2585
  • Add ability to emit plain data messages in SSE by @1cg in #2578
  • fix: sanitize newlines in SSE event and id fields by @eddieran in #2580
  • [deps] Bump stable deps and sync OptionalDependency.kt by @tipsy in #2588

New Contributors

Full Changelog: javalin-parent-7.1.0...javalin-parent-7.2.0

7.1.0

Choose a tag to compare

@tipsy tipsy released this 15 Mar 17:12

What's Changed

  • Bump com.fasterxml.jackson.core:jackson-core from 2.21.0 to 2.21.1 by @dependabot[bot] in #2543
  • [deps]: Bump the dependencies group across 1 directory with 17 updates by @dependabot[bot] in #2545
  • [websocket] Fix WebSocket over HTTP/2 Extended Connect (RFC 8441) by @tipsy in #2547
  • fix(README): update artifactId for SSL plugin in README.md by @yvasyliev in #2556
  • Add wsExceptionHandler to MicrometerPlugin for WebSocket exception tagging by @Copilot in #2557
  • [rendering] jte - introduce directoryTemplateEngine for (6.x-like), rename default to classPathTemplateEngine by @elwin013 in #2551
  • Add javalin-bom module by @Copilot in #2558
  • [performance] Reduce per-request overhead in hot path by @tipsy in #2559
  • [performance] Eliminate per-request regex and allocation overhead by @tipsy in #2560

New Contributors

Full Changelog: javalin-parent-7.0.1...javalin-parent-7.1.0

7.0.1

Choose a tag to compare

@tipsy tipsy released this 28 Feb 17:40

What's Changed

  • [readme] v7 release updates by @tipsy in #2527
  • [micrometer] Fix interference with user-configured request logger by @Copilot in #2533
  • [logging] Allow for multiple request loggers by @tipsy in #2539

Full Changelog: javalin-parent-7.0.0...javalin-parent-7.0.1

7.0.0

Choose a tag to compare

@tipsy tipsy released this 22 Feb 13:13

What's Changed

  • Fix infinite loop in custom exception handling by @LordOfLeaks in #2423
  • [workflow]: Bump actions/checkout from 4 to 5 in the dependencies group by @dependabot[bot] in #2428
  • Add comprehensive GitHub Copilot instructions with commit message convention by @Copilot in #2433
  • Bump and rename sslcontext-kickstart to ayza by @Hakky54 in #2434
  • Update Javalin to version 7.0.0-SNAPSHOT with Java 17 requirement by @Copilot in #2431
  • Improve test suite by adding HTTP status code assertions and cleaning up static files tests by @Copilot in #2437
  • [core] Migrate to Jetty 12 by @tipsy in #2444
  • [workflow]: Bump the dependencies group with 3 updates by @dependabot[bot] in #2445
  • Optimize static file handling by leveraging Jetty 12 native capabilities by @Copilot in #2447
  • Upgrade Kotlin from 1.9.25 to 2.0.21 and remove JTE integration by @Copilot in #2452
  • [deps] Update Pebble to 3.2.4 and fix package imports for CVE security fix by @Copilot in #2453
  • Update all dependencies and plugins to latest stable versions by @Copilot in #2456
  • [context] add support for quoted charset in content-type header (#2448) by @Pinusar in #2449
  • Add onUpgrade method to WebSocket RequestLogger by @Copilot in #2450
  • Fix cookie handling in JavalinTest client by @Copilot in #2459
  • Replace OkHTTP with native JDK HttpClient in javalin-testtools by @Copilot in #2461
  • [ssl] Drop Conscrypt ALPN support from SSL Plugin by @Copilot in #2464
  • [compression] Add preferred compressors list by @fabiobento512 in #2427
  • Add Zstandard compression support using zstd-jni by @Copilot in #2465
  • Fix Missing Allow Header in HTTP 405 Responses by @Copilot in #2468
  • [sse] Relax Accept header validation to support multiple content types by @Copilot in #2474
  • [routing] Support custom HTTP methods by @tipsy in #2478
  • [tests] Fix flakiness in TestRateLimitUtil by @tipsy in #2477
  • [javalin] Move routing to config by @tipsy in #2479
  • [maven] Refactor modules by @tipsy in #2481
  • [github] Improve copilot-instructions.md with comprehensive Javalin patterns and philosophy by @Copilot in #2483
  • [core] Introduce endpoint stack and utilize endpoints more by @tipsy in #2486
  • [async] Improve async handling by @tipsy in #2489
  • [deps] Upgrade OkHttp to 5.3.0 by @Copilot in #2496
  • [core] Add config option to disable old version check warning by @Copilot in #2499
  • Add static keyword to wsBefore and wsAfter in ApiBuilder by @Copilot in #2501
  • [deps] Update Pebble to 4.0.0 by @kamenitxan in #2502
  • [workflow]: Bump actions/checkout from 5 to 6 in the dependencies group by @dependabot[bot] in #2503
  • [config] Rework JavalinConfig by @tipsy in #2504
  • [tests] Add missing test cases by @tipsy in #2506
  • [cors] Use JDK's URI class by @Playacem in #2180
  • [micrometer] Restore Micrometer plugin for Javalin7/Jetty12 by @tipsy in #2511
  • [json] Fix NoClassDefFoundError for ObjectMapper on Kotlin 2.x by @fahrradflucht in #2510
  • Extend Context#redirect to beforeMatched and rename skipIfExceptionOccurred by @Copilot in #2515
  • [routing] Clean up unused interfaces and generics by @tipsy in #2517
  • [workflow]: Bump the dependencies group with 2 updates by @dependabot[bot] in #2518
  • [routing] Add endpoint-wrapper by @tipsy in #2516
  • [deps]: Bump the dependencies group with 8 updates by @dependabot[bot] in #2519
  • Add beforeMatched and afterMatched handlers to io.javalin.apibuilder.ApiBuilder.java. Fix bug#2521 by @passcar99 in #2522
  • [static-files] Introduce jetty-free resource handler by @tipsy in #2520
  • [deps]: Bump the dependencies group with 27 updates by @dependabot[bot] in #2524
  • Support HTTP QUERY method by @norrs in #2525

New Contributors

Full Changelog: javalin-parent-6.7.0...javalin-parent-7.0.0

7.0.0-beta.3

Choose a tag to compare

@tipsy tipsy released this 08 Feb 11:09

What's Changed

Full Changelog: javalin-parent-7.0.0-beta.2...javalin-parent-7.0.0-beta.3

7.0.0-beta.2

Choose a tag to compare

@tipsy tipsy released this 08 Feb 11:09

What's Changed

  • Add beforeMatched and afterMatched handlers to io.javalin.apibuilder.ApiBuilder.java. Fix bug#2521 by @passcar99 in #2522
  • [static-files] Introduce jetty-free resource handler by @tipsy in #2520

New Contributors

Full Changelog: javalin-parent-7.0.0-beta.1...javalin-parent-7.0.0-beta.2