Commit Graph

343 Commits

Author SHA1 Message Date
Lukasz Lenart 76c0887972 [maven-release-plugin] prepare for next development iteration 2026-08-01 12:28:23 +02:00
Lukasz Lenart 52628432a9 [maven-release-plugin] prepare release STRUTS_6_11_0 2026-08-01 12:28:14 +02:00
Lukasz Lenart a1c8af5574 WW-5666 Apply input length limits consistently when reading request bodies (6.x) (#1822)
* WW-5666 fix(json): apply the input length limit while reading

* WW-5666 fix(core): bound the CSP report body read and make the limit configurable

CspReportAction read the submitted report body with a single readLine() and had
no limit of its own. Read it up to a limit instead, defaulting to 8192
characters and configurable through struts.csp.report.maxSize. A body above the
limit is discarded with a warning rather than processed.

The limit is injected when the action is built, before the interceptor stack
runs, because withServletRequest is invoked by the servletConfig interceptor
ahead of staticParams and params. Values that are not usable as a buffer size
are ignored with a warning.
2026-08-01 10:04:57 +02:00
Lukasz Lenart f8d42eb023 Prepare for a new development cycle of Struts 6.11.0 (#1739)
* [maven-release-plugin] prepare release STRUTS_6_10_0

* [maven-release-plugin] prepare for next development iteration
2026-06-14 07:39:08 +00:00
Lukasz Lenart 0db282a51a pom(version): sets proper SNAPSHOT version (#1709) 2026-05-25 15:04:31 +00:00
Lukasz Lenart ca1b22d9be Struts 6.9.0 (#1662)
* [maven-release-plugin] prepare release STRUTS_6_9_0

* [maven-release-plugin] prepare for next development iteration
2026-05-01 10:41:26 +02:00
Lukasz Lenart 0a8b111e36 WW-5537 fix(core): resolve classloader/memory leaks during Tomcat hot deployment (#1631)
* WW-5537 fix(core): resolve classloader/memory leaks during Tomcat hot deployment

Introduce InternalDestroyable interface with container-based discovery to
clean up static caches, daemon threads, and shared references that pin the
webapp classloader after undeploy. This prevents OutOfMemoryError (Metaspace)
on repeated hot deployments.

Changes:
- Add InternalDestroyable/ContextAwareDestroyable interfaces for cleanup hooks
- Clear OGNL, Component, ScopeInterceptor, DefaultFileManager static caches
- Stop FinalizableReferenceQueue daemon thread and null its classloader
- Clear FreeMarker template/introspection caches from ServletContext
- Replace ContainerHolder ThreadLocal with volatile to prevent thread-pool leaks
- Clear static dispatcherListeners list on Dispatcher cleanup
- Add JSONCacheDestroyable for json plugin cache cleanup
- Register all destroyables via struts-beans.xml / struts-plugin.xml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 chore(showcase): add log4j-web for proper Log4j2 lifecycle in Servlet container

Without log4j-web, Log4j2 SoftReferences delay classloader GC after undeploy.
The log4j-web module provides Log4jServletContextListener which ensures proper
Log4j2 shutdown during ServletContext destruction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 fix(core): use ThreadLocal with generation counter in ContainerHolder

Replace the volatile shared reference with a ThreadLocal backed by a volatile
generation counter. Per-request clear() only affects the current thread (safe
for concurrent requests and tests). On undeploy, invalidateAll() advances the
generation counter so idle pool threads detect staleness on next access and
self-clear, preventing classloader leaks without breaking test isolation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:17:44 +02:00
Lukasz Lenart f644ea54e2 WW-5618 feat(json): add configurable limits to JSON plugin for DoS prevention (#1626)
Add configurable limits to the JSON plugin to prevent denial-of-service
attacks via malicious JSON payloads. Limits are enforced directly in the
existing JSONReader class without breaking backward compatibility (no
interface extraction or class renames).

New configurable constants (struts-plugin.xml defaults):
- struts.json.maxElements (10000) - per-container element count
- struts.json.maxDepth (64) - maximum nesting depth
- struts.json.maxLength (2097152) - maximum input length in chars
- struts.json.maxStringLength (262144) - maximum string value length
- struts.json.maxKeyLength (512) - maximum object key length

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 12:11:22 +01:00
Lukasz Lenart bfebc3e4a1 WW-4428 feat(json): add java.time serialization and deserialization support (#1616)
- Add serialization support for LocalDate, LocalDateTime, LocalTime,
  ZonedDateTime, OffsetDateTime, and Instant in DefaultJSONWriter
- Add deserialization support for the same types in JSONPopulator
- Support @JSON(format=...) custom formats for all temporal types
- Add Calendar deserialization support (was serialize-only)
- Add comprehensive tests including custom formats, null handling,
  malformed input, and round-trip serialization/deserialization

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:43:08 +01:00
Lukasz Lenart edd604a9c5 Sets a proper SNAPSHOT version before next release (#1615) 2026-03-09 10:24:37 +01:00
Lukasz Lenart 34e279e6d7 [maven-release-plugin] prepare for next development iteration 2025-09-15 07:46:27 +02:00
Lukasz Lenart 80225c7169 [maven-release-plugin] prepare release STRUTS_6_8_0 2025-09-15 07:46:18 +02:00
Lukasz Lenart ca4e07cead [maven-release-plugin] prepare for next development iteration 2025-02-20 13:20:56 +01:00
Lukasz Lenart 8fb9aba74b [maven-release-plugin] prepare release STRUTS_6_7_4 2025-02-20 13:20:46 +01:00
Lukasz Lenart 87e322dbe2 [maven-release-plugin] prepare for next development iteration 2025-02-17 11:34:19 +01:00
Lukasz Lenart 7909f43237 [maven-release-plugin] prepare release STRUTS_6_7_3 2025-02-17 11:34:11 +01:00
Lukasz Lenart 7a77c7a82c [maven-release-plugin] prepare for next development iteration 2025-02-04 07:39:44 +01:00
Lukasz Lenart 5038a9209f [maven-release-plugin] prepare release STRUTS_6_7_2 2025-02-04 07:39:35 +01:00
Lukasz Lenart 07603b9591 [maven-release-plugin] prepare for next development iteration 2025-02-02 10:16:30 +01:00
Lukasz Lenart 3227d5929a [maven-release-plugin] prepare release STRUTS_6_7_1 2025-02-02 10:16:20 +01:00
Lukasz Lenart 6de93e77db Defines proper snapshot version 2025-01-24 07:58:39 +01:00
Lukasz Lenart 60a3db0a63 Sets version to 6.7.1-SNAPSHOT to prepare for another development cycle 2024-12-18 14:43:29 +01:00
Lukasz Lenart 1f5305c249 [maven-release-plugin] prepare release STRUTS_6_7_0 2024-11-17 10:57:09 +01:00
Kusal Kithul-Godage ebedd7391f WW-3714 Marker interface migration follow-up 2024-10-22 13:55:46 +11:00
Lukasz Lenart d33be1d43c [maven-release-plugin] prepare for next development iteration 2024-10-05 16:08:38 +02:00
Lukasz Lenart c812450292 [maven-release-plugin] prepare release STRUTS_6_6_1 2024-10-05 16:08:26 +02:00
Lukasz Lenart f977f0c0e5 [maven-release-plugin] prepare for next development iteration 2024-07-20 08:28:46 +02:00
Lukasz Lenart d6e30b45da [maven-release-plugin] prepare release STRUTS_6_6_0 2024-07-20 08:28:35 +02:00
Kusal Kithul-Godage f9953938f7 WW-5440 Add missing annotations 2024-07-13 21:57:26 +10:00
Lukasz Lenart 54e387dc6f [maven-release-plugin] prepare for next development iteration 2024-07-12 07:27:19 +02:00
Lukasz Lenart dbfb59cb7c [maven-release-plugin] prepare release STRUTS_6_5_0 2024-07-12 07:27:08 +02:00
Lukasz Lenart c6d13f1016 [maven-release-plugin] prepare for next development iteration 2024-04-07 11:22:16 +02:00
Lukasz Lenart 9c5c80d173 [maven-release-plugin] prepare release STRUTS_6_4_0 2024-04-07 11:22:06 +02:00
Lukasz Lenart a6d6d918fa Reverts release and fixes issue with assembly 2024-04-07 11:14:44 +02:00
Lukasz Lenart 5e8b81b382 [maven-release-plugin] prepare for next development iteration 2024-04-07 08:13:17 +02:00
Lukasz Lenart f8381fbdbf [maven-release-plugin] prepare release STRUTS_6_4_0 2024-04-07 08:13:07 +02:00
Lukasz Lenart b7f73715d9 [maven-release-plugin] prepare for next development iteration 2023-09-11 09:49:51 +02:00
Lukasz Lenart 236ae15c66 [maven-release-plugin] prepare release STRUTS_6_3_0_1 2023-09-11 09:49:42 +02:00
Lukasz Lenart f4253ff8ff [maven-release-plugin] prepare for next development iteration 2023-09-11 09:22:20 +02:00
Lukasz Lenart 0ba2d69af9 [maven-release-plugin] prepare release STRUTS_6_3_0_1 2023-09-11 09:22:12 +02:00
Lukasz Lenart a0185f2483 [maven-release-plugin] prepare for next development iteration 2023-09-01 08:01:39 +02:00
Lukasz Lenart 1a88f78a7e [maven-release-plugin] prepare release STRUTS_6_3_0 2023-09-01 08:01:30 +02:00
Lukasz Lenart 20e2110614 Reverts version to 6.3.0-SNAPSHOT 2023-09-01 07:44:47 +02:00
Lukasz Lenart 32e42b3ecd [maven-release-plugin] prepare for next development iteration 2023-08-23 07:30:16 +02:00
Lukasz Lenart 04e9246389 [maven-release-plugin] prepare release STRUTS_6_3_0 2023-08-23 07:30:08 +02:00
Kusal Kithul-Godage 94c1b2a29b WW-5334 Add AssertJ as default plugin test dependency 2023-08-20 20:38:35 +10:00
Kusal Kithul-Godage 9a286c9353 WW-5334 Remove other unneeded declarations 2023-08-19 12:23:20 +10:00
Kusal Kithul-Godage ceb4e38b74 WW-5334 Remove plugin dependency on commons-lang3 (provided by core) 2023-08-19 12:10:45 +10:00
Kusal Kithul-Godage 05cfe51d5f WW-5334 Extract javax.servlet-api into parent POM 2023-08-18 22:17:11 +10:00
Lukasz Lenart 62b41ef466 [maven-release-plugin] prepare for next development iteration 2023-06-28 09:13:16 +02:00