[wp-trac] [WordPress Trac] #54193: PHP fileinfo extention identifies JSON as text/plain; wp_check_filetype_and_ext then prevents upload
WordPress Trac
noreply at wordpress.org
Tue Sep 28 06:00:05 UTC 2021
#54193: PHP fileinfo extention identifies JSON as text/plain;
wp_check_filetype_and_ext then prevents upload
-------------------------------------+------------------------------
Reporter: dashifen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-refresh | Focuses:
-------------------------------------+------------------------------
Changes (by mukesh27):
* keywords: => has-patch needs-refresh
* version: 5.8.1 =>
Comment:
Hi there! thanks for the ticket and patch.
Your patch [attachment:"fileinfo-json-fix.diff"] removed
`application/json` from the file.
Here are a couple of resources to help you get started creating and
submitting a patch:
- [https://make.wordpress.org/core/handbook/tutorials/working-with-
patches/#creating-a-patch-with-the-command-line Creating a patch with the
command line] (as I noticed in the pngs you're using git)
- [https://make.wordpress.org/core/handbook/tutorials/faq-for-new-
contributors/ FAQ for New Contributors]
For creating the patch
- Checkout the `master` branch (the images show you are on the 5.8 branch)
- Sync your copy of `master` to the upstream `wordpress/wordpress-develop`
repo, i.e. by pulling the latest changes from upstream and then merging
these changes into your local copy
- Add the comment change
- Then `svn diff > 54193.diff` to create the patch file
- Then upload that patch file to this ticket
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54193#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list