Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#16217 closed defect (bug) (fixed)

XMLRPC upload limits don't follow the same rules than the web interface

Reported by: koke's profile koke Owned by: markjaquith's profile markjaquith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.1
Component: XML-RPC Keywords: 3.2-early has-patch mobile commit
Focuses: multisite Cc:

Description

If you have upload_space_check_disabled=true and fileupload_maxk=0, from the dahsboard (at least with the flash uploader) it means no limits, but from xmlrpc every upload fails

The first calls wp_handle_upload, which has a filter check_upload_size, and it checks the space limit check:

if ( get_site_option( 'upload_space_check_disabled' ) )
    return $file;

However, xmlrpc uses wp_upload_bits, which has a filter upload_is_file_too_big, which only checks fileupload_maxk

Attachments (1)

16217.patch (693 bytes) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (10)

#1 @daniloercoli
13 years ago

  • Cc daniloercoli added

#2 @PeteMall
13 years ago

  • Keywords 3.2-early needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#3 @westi
13 years ago

  • Cc westi added
  • Component changed from Multisite to XML-RPC
  • Keywords multisite added

#4 @SergeyBiryukov
13 years ago

  • Keywords has-patch added; needs-patch removed

#5 @josephscott
13 years ago

  • Cc josephscott added

#6 @koke
13 years ago

  • Keywords mobile added

#7 @nacin
12 years ago

  • Keywords commit added

This looks good as a stopgap. I'd love to rewrite all of the upload-handling functions for multisite at the same time as ms-files.php going away.

#8 @nacin
12 years ago

  • Milestone changed from Future Release to 3.5

#9 @markjaquith
12 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In [21237]:

Do not block XML-RPC uploads when upload_space_check_disabled is true, regardless of fileupload_maxk value. props SergeyBiryukov. fixes #16217

Note: See TracTickets for help on using tickets.