[MAGNOLIA-8889] MultipartRequestFilter#fileCountMax restricts not only files but any param Created: 03/May/23  Updated: 27/Dec/23  Resolved: 29/Jun/23

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.33
Fix Version/s: 6.3.0, 6.2.37

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Quach Hao Thien
Resolution: Fixed Votes: 2
Labels: VN-Maintenance
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 1d 1.5h Time Spent: 1d 1.5h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: Text File stacktrace.txt.log    
Issue Links:
Problem/Incident
Relates
causality
duplicate
duplicates MAGNOLIA-8902 MultipartRequestFilter sets filesCoun... Closed
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-8966 Implementation Sub-task Completed Quach Hao Thien  
MAGNOLIA-8967 Review Sub-task Closed Antonín Juran  
MAGNOLIA-8968 PreintQA Sub-task Closed Antonín Juran  
MAGNOLIA-8969 QA Sub-task Completed Adam Siska  
MAGNOLIA-8970 docu review Documentation Task Completed  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Support
Sprint: Nucleus 39
Story Points: 1
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1.  Go to demo and edit the MultipartRequestFilter at [servers/filter|/server/filters/multipartRequest] section
  2.  Include a new attribute named fileCountMax and set its value to 1
  3. Include a new attribute named maxFileSize and set its value to 2000000000
  4. Go to travel/members/registration form
  5. Fulfill the form and send it
  6. Check a 500 Internal error is thrown

Expected results

The form is sent and processed without issues as far as it has no files (only fields)

Actual results

500 Internal server error is thrown

Workaround

Increase fileCountMax https://docs.magnolia-cms.com/product-docs/6.2/Administration/Architecture/Request-processing-and-filters/Filters.html#_multipart_request

Development notes

Attached the log stack trace



 Comments   
Comment by Jaromir Sarf [ 09/Jun/23 ]

Discovery:

Comment by Quach Hao Thien [ 28/Jun/23 ]

Solution:

  • Catch FileCountLimitExceededException and re-throw exception with more detail message
  • Increase the 
    DEFAULT_FILE_COUNT_MAX by 100 to avoid the exception 

  • Update the document
Generated at Mon Feb 12 04:36:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.