Make WordPress Core


Ignore:
Timestamp:
11/07/2021 11:28:48 PM (3 years ago)
Author:
antpb
Message:

Media: Remove security messaging in media upload failures.

Previously, when uploading a media item type that is not supported, the default error message claims that the reason it cannot upload is due to security reasons. This is not always true. Now the warning says that the type is not allowed, which is always true.

Props antpb, Presskopp, peterwilsoncc, desrosj, iluy, circlecube, mikeschroder.
Fixes #53626.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r52006 r52032  
    876876        'file_exceeds_size_limit'   => __( '%s exceeds the maximum upload size for this site.' ),
    877877        'zero_byte_file'            => __( 'This file is empty. Please try another.' ),
    878         'invalid_filetype'          => __( 'Sorry, this file type is not permitted for security reasons.' ),
     878        'invalid_filetype'          => __( 'Sorry, you are not allowed to upload this file type.' ),
    879879        'not_an_image'              => __( 'This file is not an image. Please try another.' ),
    880880        'image_memory_exceeded'     => __( 'Memory exceeded. Please try another smaller file.' ),
Note: See TracChangeset for help on using the changeset viewer.