Dnn.Platform icon indicating copy to clipboard operation
Dnn.Platform copied to clipboard

[Bug]: Empty file names after uploading in ckeditor image upload

Open mohamad-asghari opened this issue 2 years ago • 6 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues

What happened?

After uploading images in ckeditor, file names should be saved correctly. This problem occurs for non-English names, specifically Arabic and Persian.

Steps to reproduce?

1- Go to Ckeditor image upload . 2- upload a file with non-English names. like "سلام.jpg" or "سلام.png" 3- Upload images.

Current Behavior

No response

Expected Behavior

No response

Relevant log output

No response

Anything else?

No response

Affected Versions

9.11.2 (latest release), 9.12.0-rc1 (release candidate)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

mohamad-asghari avatar Jun 17 '23 11:06 mohamad-asghari

I believe that this requires a configuration element on the IIS server?

mitchelsellers avatar Jun 17 '23 13:06 mitchelsellers

Can you attach a file here on this issue that has an arabic filename, I would not even know where to start to type such characters. It may help someone non-arabic to debug the issue...

valadas avatar Jun 18 '23 03:06 valadas

  • https://www.techorasoft.com/portals/0/نمونه.png
  • https://www.techorasoft.com/portals/0/تست.jpg

mohamad-asghari avatar Jun 18 '23 08:06 mohamad-asghari

Thank @asgharifaratech I can confirm the issue. The file does get saved on disk withou any name. File works but loosed it's entire name. Triaging accordingly.

valadas avatar Jun 18 '23 16:06 valadas

I found the source of the problem: https://github.com/dnnsoftware/Dnn.Platform/blob/255e7175f9c6a558eefcf7f0890c2dfe354cd45d/DNN%20Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Browser/FileUploader.ashx.cs#L249-L250

fsdfsdf

mohamad-asghari avatar Jul 17 '23 11:07 mohamad-asghari

I did some further investigation and found that this line of code causes the name to be cleared: https://github.com/dnnsoftware/Dnn.Platform/blob/255e7175f9c6a558eefcf7f0890c2dfe354cd45d/DNN%20Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Utilities/Utility.cs#L224

mohamad-asghari avatar Jul 17 '23 12:07 mohamad-asghari