[wp-trac] [WordPress Trac] #45818: ALLOW_UNFILTERED_UPLOADS does not work on multisite

WordPress Trac noreply at wordpress.org
Fri Jan 4 15:22:44 UTC 2019


#45818: ALLOW_UNFILTERED_UPLOADS does not work on multisite
--------------------------+------------------------------
 Reporter:  Hube2         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  multisite
--------------------------+------------------------------

Comment (by Hube2):

 If the goal is to completely prevent unfiltered uploads on multisite
 except for super admin then that if statement is correct. However, I don't
 see why this would be the case, but maybe I'm missing something. On the
 other hand, if the goal is to allow unfiltered uploads to super admins and
 all others as well if ALLOW_UNFILTERED_UPLOADS is true (which is what I
 would expect) then a couple of minor adjustments to the if statement will
 correct it
 {{{#!php
 <?php
 if ( ( defined('ALLOW_UNFILTERED_UPLOADS' ) &&
  ALLOW_UNFILTERED_UPLOADS ) || ( is_multisite() && is_super_admin(
 $user_id
  ) )  )
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45818#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list