Make WordPress Core


Ignore:
Timestamp:
09/04/2019 04:46:27 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Escape the output in wp_ajax_upload_attachment().

Merges [45936] to the 3.9 branch.
Props whyisjake, sstoqnov.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/src/wp-admin/includes/ajax-actions.php

    r44855 r45966  
    16211621                'data'    => array(
    16221622                    'message'  => __( 'The uploaded file is not a valid image. Please try again.' ),
    1623                     'filename' => $_FILES['async-upload']['name'],
     1623                    'filename' => esc_html( $_FILES['async-upload']['name'] ),
    16241624                )
    16251625            ) );
     
    16361636            'data'    => array(
    16371637                'message'  => $attachment_id->get_error_message(),
    1638                 'filename' => $_FILES['async-upload']['name'],
     1638                'filename' => esc_html( $_FILES['async-upload']['name'] ),
    16391639            )
    16401640        ) );
Note: See TracChangeset for help on using the changeset viewer.