Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Pull#2

Open
prateek200787 wants to merge 31 commits intoapache:STRUTS_1_2_BRANCHfrom
kawasima:STRUTS_1_2_BRANCH
Open

Pull#2
prateek200787 wants to merge 31 commits intoapache:STRUTS_1_2_BRANCHfrom
kawasima:STRUTS_1_2_BRANCH

Conversation

@prateek200787
Copy link

No description provided.

kawasima and others added 30 commits May 13, 2015 10:23
- Implement tests for OptionTag to validate XSS protection and HTML escaping.
- Create tests for ForwardTag to ensure proper forward handling and error management.
- Add tests for MatchTag and NotMatchTag to verify matching logic against request parameters and attributes.
- Introduce tests for NotEmptyTag to check for non-empty conditions on various data types.
- Develop tests for ModuleUtils to validate module configuration retrieval and selection.
- Add tests for ResponseUtils to ensure proper HTML character escaping and URL encoding.
This commit introduces a new XML file, validator-rules.xml, which contains the default pluggable validator definitions for Struts. The file includes various validation rules such as required fields, length checks, data type validations, and more. It also provides associated error messages that can be referenced in the ApplicationResources.properties file. This setup is essential for integrating the Struts Validator into the application.
…revent path traversal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix GHSA-xgrq-qjm7-p99v: validate page parameter in SwitchAction to p…
…revent XSS

Apply ResponseUtils.filter() to message content in ErrorsTag.doStartTag()
before appending to output buffer. Previously, non-resource ActionMessage
keys and resource message arguments were written raw, allowing reflected
XSS (CVE-2012-1007).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rt handlers to prevent memory exhaustion

Add a configurable maxTextFieldSize property (default 256KB) to
ControllerConfig. CommonsMultipartRequestHandler.addTextParameter()
now checks item.getSize() against the limit and skips oversized
fields. MultipartIterator.createTextMultipartElement() tracks bytes
read and drains the stream without storing data when the limit is
exceeded; getNextElement() recurses past skipped fields so subsequent
normal-sized fields are still returned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enforce per-text-field size limit in multipart handlers
…eter population to prevent validator bypass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix GHSA-cr42-9px3-5v7x: suppress validatorResults from request parameter population
… to prevent path traversal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix GHSA-6gxc-rr3q-63w6: path traversal via Tiles LOCALE_KEY
… output to prevent CRLF log injection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix GHSA-r7xj-rhwv-rpq5: CRLF log injection in LookupDispatchAction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants