Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes problem when post_max_size is set to unlimited but upload_max_filesize has a limit #538

Merged
merged 1 commit into from
May 24, 2024

Conversation

DanielLaranjeira063
Copy link
Contributor

Currently, if you have in your server, lets say 100M limit for file uploads, but post_max_size is set to unlimited (by setting it's value to 0), the bundle will set the upload_max_filesize setting to 0 as it's taking the minimum value between both into account. and it won't let you upload any files as javascript is comparing the size of the file to the value of 0.
This PR changes that so that if the minimum value between post_max_size is set to 0, then it should only take max_upload_filesize into account. If that value is set to 0 as well, then it is correct, as max_upload_filesize does not have an unlimiter.
If none of them are set to 0, then it will take the minimum value between the two as it's supposed to.

…t to 0 (unlimited) then max_upload_filesize should be the limiter
Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@robertSt7 robertSt7 self-assigned this May 24, 2024
@robertSt7 robertSt7 modified the milestone: 1.4.3 May 24, 2024
@robertSt7 robertSt7 merged commit 4a9302f into pimcore:1.4 May 24, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
@robertSt7
Copy link
Contributor

@DanielLaranjeira063 Thanks a lot for the fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants