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

Don't accept files that are bigger than the upload limit when uploading plugins #16849

Merged
merged 4 commits into from Jan 1, 2021

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 1, 2020

Description:

fixes #16847

Review

  • Functional review done
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@sgiehl sgiehl added the Needs Review PRs that need a code review label Dec 1, 2020
@tsteur tsteur added this to the 4.3.0 milestone Dec 1, 2020
@diosmosis
Copy link
Member

Noticed if a strange value is set in php.ini, it is used as is and shows up in data-max-size. Eg, if I use "8 M", data-max-size is "8 ". Setting it to blahblah or 8blahblahM sets data-max-size to "" which I think is correct, so it's just if there's a bunch of spaces and no math is done I guess.


// no max upload size
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible and a good idea to have some unit tests for this code?

Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works and code looks good, just left a couple of minor comments

@sgiehl
Copy link
Member Author

sgiehl commented Dec 2, 2020

@diosmosis I've improved the code a bit more and added a simple test

@diosmosis diosmosis merged commit 339b5cd into 4.x-dev Jan 1, 2021
@diosmosis diosmosis deleted the pluginuploadlimit branch January 1, 2021 00:30
@mattab mattab modified the milestones: 4.7.0, 4.5.0 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The parameter ‘confirmPassword’ isn’t set in the Request
4 participants