-
Type: Bug Report
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.2-B3
-
Component/s: File Uploader, PHP Compatibility
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:When maximal uploaded file size in "php.ini" was configured in KB or GB it was treated in MB.
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
- create "kUtil::parseIniSize($size)" method, that will: - 0.5h
- if value is integer, then return it as-as
- if value contains K/M/G shorthand (case insensitive) then return numeric part multiplied by byte equivalent for a particular shorthand
- in "startup.php" use this logic for "MAX_UPLOAD_SIZE" constant value detection: - 0.5h
- start with "kUtil::parseIniSize" processed value of "upload_max_filesize" setting
- get value of "post_max_size" setting and when it's value isn't "0" (means we have restrictions), then:
- use "kUtil::parseIniSize" function on it
- choose smallest value between this one and previous one
- get value of "memory_limit" setting and when it's value isn't "-1" (means we have restrictions), then:
- use "kUtil::parseIniSize" function on it
- choose smallest value between this one and previous one
- set "MAX_UPLOAD_SIZE" to result above calculations
Quote: 1h*1.4=1.5h
- implemented in
-
[Diffusion] rINP16633 Fixes INP-1721 - Correct math for detecting allowed file size during upload
-
D349 INP-1721 Correct math for detecting allowed file size during upload
- mentioned in
-
Page Loading...