OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.24k stars 2.34k forks source link

Plus signs in Media file or folder name break Media Library links and previews #11673

Open IsQiao opened 2 years ago

IsQiao commented 2 years ago

Describe the bug

if i upload a file named aaa+++.jpg to azure storage. it will lost in preview page.

To Reproduce

Steps to reproduce the behavior:

  1. Upload a file named aaa+++.png in media library page.
  2. File name become a aaa .png in preview page. but the real filename is aaa+++.png
  3. So the file not found.

Expected behavior

the filename is aaa+++.png in preview page

Screenshots

image image

Piedone commented 1 month ago

I just checked, and this is a generic Media issue, not just specific to Azure Blob Storage. Furthermore, as the duplicate https://github.com/OrchardCMS/OrchardCore/issues/16163 issue explains, this is also a problem with the plus sign in the folder names too. So, this needs to be fixed on a higher level, not just for Blob Storage, and for folder names too.

See that other issue for different repro steps.

gvkries commented 1 month ago

I thought that maybe #16135 fixes issue #16163 as well, but I couldn't repro it from the main branch with local files (on Windows). So not sure if it still is an issue or has been fixed. Can someone else check again? Thanks.

Piedone commented 1 month ago

Yes, still get the same with the current main:

image

gvkries commented 1 month ago

That's because of IIS, isn't it? I used Kestrel...

Piedone commented 1 month ago

Might be that as well.