Bug #88055

Faulty error-handling when uploading large files

Added by Jarvis H 4 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Form Framework
Start date:
2019-04-02
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

Description

Typo3 Version: 9.5.4

Error 1: File size exceeds post_max_size

How to reproduce:
- Upload file larger then post_max_size

Error shown:
Warning: POST Content-Length of 215854163 bytes exceeds the limit of 104857600 bytes in Unknown on line 0

Suspected cause:
This is the normal error handling for php, but maybe it is possible to check if the file is too large before this occurs, to ensure a proper error message.

Error 2: Memory error when file size exceeds available memory

--> Moved to #88235


Related issues

Related to TYPO3 Core - Bug #88235: Ext: form file upload Memory error when file size exceeds available memory Closed 2019-04-27

Associated revisions

Revision c49754de (diff)
Added by Susanne Moog 3 months ago

[TASK] Display max file size hint

When configuring a form with a file size validator it can be helpful to
know what the servers' max upload capabilities are. As it may make sense
to set bigger values and then contact a server admin to adjust the
server settings, we do not want to restrict the input field. Instead,
a hint with the current configuration has been added to inform the
editor / integrator of the current limitations.

Resolves: #88055
Releases: master
Change-Id: Iaae73f8df87f47484e29a810c7531a117e35a286
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595
Tested-by: TYPO3com <>
Tested-by: Dominik Merkel <>
Tested-by: Ralf Zimmermann <>
Reviewed-by: Ralf Zimmermann <>

History

#1 Updated by Jarvis H 4 months ago

  • Priority changed from Should have to Must have

#2 Updated by Bjoern Jacob 3 months ago

  • Sprint Focus set to Remote Sprint

#3 Updated by Susanne Moog 3 months ago

  • Related to Bug #88235: Ext: form file upload Memory error when file size exceeds available memory added

#4 Updated by Susanne Moog 3 months ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to Susanne Moog
  • Target version set to Candidate for Major Version

#5 Updated by Gerrit Code Review 3 months ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595

#6 Updated by Gerrit Code Review 3 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595

#7 Updated by Susanne Moog 3 months ago

We cannot sensible catch the error as it is coming directly from PHP (and in this case not via the PHP upload error handling but we never even get to the point where $_FILES is filled).

As the install tool already checks mismatches of post_max_size and upload_max_size this would clearly be a misconfiguration of either TYPO3 or the server and should not be handled in form. However, to allow the editor / form integrator to react to max size issues the current patch now displays a hint with the configured max size that is usable at that moment so an integrator can either use that or talk to their admin to get the configuration fixed.

Additionally, I moved error 2 to a separate issue.

#8 Updated by Gerrit Code Review 3 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595

#9 Updated by Gerrit Code Review 3 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595

#10 Updated by Gerrit Code Review 3 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60595

#11 Updated by Anonymous 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#12 Updated by Benni Mack 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF