Looks like this is a defect. Ish.
As @s_ha_dum mentioned, this is to prevent a directory traversal attack. However, WordPress’ Media Library will happily let you upload a file with two or more periods in a row, even if ms-files.php will refuse to serve it up.
So, nothing is technically “broken”, but this certainly isn’t ideal. There’s a patch to prevent this, but it looks like it was never actually added to the core:
https://core.trac.wordpress.org/attachment/ticket/16189/check%20for%20double%20periods.diff
More info on this defect:
https://core.trac.wordpress.org/ticket/12756
Related Posts:
- Storing WordPress Media Library Uploaded files onto a separate domain
- How to show all available images in WP’s media library when using the Polylang plugin?
- Media upload finished hook
- Users can’t upload images on frontend if they haven’t got access to the wp backend
- How can I batch delete all unattached images with WP-CLI or other automated process?
- Which filters or actions to use after a media upload and delete?
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to wp_upload_bits() to a sub-folder?
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Where do the favicons for Media Files come from
- What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How can I speed up a slow loading media library?
- What to do with unattached logos and header uploaded via native wordpress uploader?
- Append button to WordPress Image Details modal
- Add item to media library from blob or dataUrl
- add_image_size creating lots of images (of various sizes)
- WP3.5 Media Uploader – how to make it accept multiple images?
- Restrict file uploads by extension?
- Add new media uploader at frontend for wp 3.5+
- Trying to add filename over image in Media Browser
- Plugin to Import Dropbox Files into Media Folder from the Cloud [closed]
- How to disable WordPress Media resize different size version?
- Media library storing files in uploads not folders within in uploads
- Is there a limit on the number of attachments?
- How to host different file formats/types for a media attachment without creating multiple attachments?
- WordPress won’t generate image sizes for certain images
- Resize the WP media Uploader iFrame
- Site icons with alpha channel for self-hosted WordPress blog network
- how to use media library [closed]
- Can I stop wordpress generating media sizes
- Cannot upload .mp3 file to wordpress media
- Replacing Images in Media Library
- How to upload unknown file type?
- Custom “Insert into Post” button
- How to use MediaUpload outside of editor
- Switch between tabs on “Insert Media” dialog
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- WordPress auto generates small medium and large of an image on upload, how can we guess their links?
- Prevent a folder from being shown within the media library
- Is It Possible to Upload Certain Attachment Files To A Remote Server
- Error uploading image in WordPress
- Stop WordPress from generating redundant image size
- WordPress 4.9.8 Trying to add filename over image in Media Browser
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- wordpress media upload given An error occurred in the upload. Please try again later
- After moving from complete AWS setup to a standalone WordPress Server, Media/Image Files are Broken
- Using wp_enqueue_media() with switch_to_blog() issue
- Duplicates and other problems in Media Library
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- WordPress Media frame pre load images from ids
- Media library only shows for admin. Doesn’t show editor or below [closed]
- Choosing images size when uploading
- Multi Upload In Theme Options
- Resize existing library images
- Media Library Won’t Display Any Images
- upload_max_filesize in .user.ini Not Reflected in Media Upload
- A link (not in the post) to download a specific PDF file
- How to change format of file link ( Name ) when insert from media uploder
- More Fields & Media Upload
- How does wordpress handle media files?
- Set different max upload size limits based on file type/extension
- Correctly using the root directory for media uploads?
- Organizing uploaded Media in permalink-based folder structure?
- Offload Media Library to other domain on a different server
- How to allow .bin files upload?
- What is the URL pattern for image thumbnails + sizes?
- Changing titles in Uploader for “Posts”
- Add SWF file to wordpress through custom template
- How to detect when a file has been uploaded?
- Uploaded images result in a file url with full path on disk appended
- Multiple images are generated in WP-content in wordpress
- Removing extra large generated images disables all crops
- MIME types not recognized by media library
- Restrict Users to Only Edit Media Owned by Users in Their Role
- Images not displaying on site or media library
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- Images uploaded via Gutenberg image block are cropped
- Bulk upload images in upload folder does not show in media library
- Media not displaying other users uploads – WordPress 4.9.2
- Redimension thumbnail crop without creating new images
- Issues with WordPress 3.9.6 media libraries on XAMPP
- Upload Multiple Files With Multiple Fields And With media_handle_upload
- Private file system for attachments
- controlling whether upload is attached to post or not
- How to split my uploaded media into directories?
- Metabox with file upload to custom directory
- Attachment Metadata not updated while uploading audio files
- Is there a way to force Featured image to show as attachement?
- Link or button to open the media manager from frontend
- Problem uploading files, after changing domain name
- Unable to upload images using the Media Library
- Bring up the media uploader on click
- How can comments be turned off for media attachments on WordPress?
- Question regarding the file path for media_sideload_image and wp_upload_dir()
- How do I restore attachment from files in wp-upload
- Image in binary in the data to WordPress media library