Make WordPress Core


Ignore:
Timestamp:
12/14/2018 03:27:55 AM (7 years ago)
Author:
pento
Message:

KSES: Allow the download attribute on <a> tags.

To avoid this being a vector for bypassing the filetypes that are allowed to be uploaded, this attribute is only allowed to be added without a value.

Merges [43813] from the 5.0 branch to trunk.

Props kalpshit, arshidkv12, welcher, peterwilsoncc, marina_wp, pento.
Fixes #44724.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/kses.php

    r44136 r44156  
    6262        'address'    => array(),
    6363        'a'          => array(
    64             'href'   => true,
    65             'rel'    => true,
    66             'rev'    => true,
    67             'name'   => true,
    68             'target' => true,
     64            'href'     => true,
     65            'rel'      => true,
     66            'rev'      => true,
     67            'name'     => true,
     68            'target'   => true,
     69            'download' => array(
     70                'valueless' => 'y',
     71            ),
    6972        ),
    7073        'abbr'       => array(),
Note: See TracChangeset for help on using the changeset viewer.