Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#54244 closed defect (bug) (duplicate)

wp_check_filetype does not behave correctly on URI's with query strings

Reported by: ruxton's profile Ruxton Owned by: ruxton's profile Ruxton
Milestone: Priority: normal
Severity: normal Version: 5.8.1
Component: Upload Keywords: has-patch
Focuses: Cc:


When files enter this function with filenames that came from URI's, it does not correctly return a filetype.

eg. image.jpg?thing=1&otherhting=2 will not return an extension as the filename does not end in .jpg, which the regex requires it to do.

Change History (2)

This ticket was mentioned in PR #1750 on WordPress/wordpress-develop by Ruxton.

3 years ago

  • Keywords has-patch added

wp_check_filetype now works when filename does not end in extension.

Used when a filename came from a URI and contains query strings.

Trac ticket:

#2 @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Hi there, welcome back to WordPress Trac!

Thanks for the report, we're already tracking this issue in #30377.

Note: See TracTickets for help on using tickets.