Dnn.Platform
Dnn.Platform copied to clipboard
[Bug]: Empty file names after uploading in ckeditor image upload
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
I believe that this requires a configuration element on the IIS server?
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...
https://www.techorasoft.com/portals/0/نمونه.pnghttps://www.techorasoft.com/portals/0/تست.jpg
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.
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

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