I could not find an issue tracker for CKFinder (why not?). In any case here are the details:
Installation:
-ASP
-CKEditor v3.6.3
-CKFinder v2.2.1
-Mostly default configuration, no core changes, just the usual stuff to config.asp in each instance
Note: This does not happen with the CKFinder+CKEditor demo on your website. However downloading fresh copies of CKFinder 2.2.1 and CKEditor 3.6.3 from your website and running them produces this problem. The only modifications I made from stock installs was to change /ckfinder/core/connector/asp/connector.asp (INCLUDE FILE does not work), and set CheckAuthentication = True in config.asp.
Bug:
When uploading a file using the "link" button in CKEditor, a filename with spaces get's inserted into the document with "+" signs instead of URL encoded %20 or even regular spaces.
Steps to reproduce:
1. Click the "link" button in CKEditor
2. Go to the Upload tab
3. Choose a file with a filename that has spaces in it (I used a PDF)
4. Send it to server
5. When it switches to the "Link Info" tab, you will see a url that looks like this: /uploaddir/This+is+a+test+document+with+a+long+filename.pdf
When a user attempts to browse to this link by clicking on it or copying it into a browser URL bar ... you get a 404. Replace those +'s with a space in the browser, or do a URL encode yourself (insert %20 for each +) and you will see the file was uploaded.
Is there any solution in the interim of a bugfix (such as forcing ASCII? I cannot find a "forceASCII" option on the ASP version of CKFinder however)?
If I do not hear back soon my plan is to do URL rewriting on my form submit with regex (a huge PITA) or perform URL rewriting on my web server.
Installation:
-ASP
-CKEditor v3.6.3
-CKFinder v2.2.1
-Mostly default configuration, no core changes, just the usual stuff to config.asp in each instance
Note: This does not happen with the CKFinder+CKEditor demo on your website. However downloading fresh copies of CKFinder 2.2.1 and CKEditor 3.6.3 from your website and running them produces this problem. The only modifications I made from stock installs was to change /ckfinder/core/connector/asp/connector.asp (INCLUDE FILE does not work), and set CheckAuthentication = True in config.asp.
Bug:
When uploading a file using the "link" button in CKEditor, a filename with spaces get's inserted into the document with "+" signs instead of URL encoded %20 or even regular spaces.
Steps to reproduce:
1. Click the "link" button in CKEditor
2. Go to the Upload tab
3. Choose a file with a filename that has spaces in it (I used a PDF)
4. Send it to server
5. When it switches to the "Link Info" tab, you will see a url that looks like this: /uploaddir/This+is+a+test+document+with+a+long+filename.pdf
When a user attempts to browse to this link by clicking on it or copying it into a browser URL bar ... you get a 404. Replace those +'s with a space in the browser, or do a URL encode yourself (insert %20 for each +) and you will see the file was uploaded.
Is there any solution in the interim of a bugfix (such as forcing ASCII? I cannot find a "forceASCII" option on the ASP version of CKFinder however)?
If I do not hear back soon my plan is to do URL rewriting on my form submit with regex (a huge PITA) or perform URL rewriting on my web server.
Re: Bug: Uploading files with spaces in filename
When changed to:
The problem goes away and spaces are inserted. The likely culprit is then oCKFinder_Factory.Config.encodeURIComponent. This is a new function implemented incorrectly.
The problem lies in ASP's Server.URLEncode method. This is NOT a good method to use to encode a URL for "clickability".
My solution for now is to not use the encodeURIComponent method. Why does the filename have to be URI encoded? That doesn't make sense to me ... you want it to be a direct URL so that people can link to it.
Re: Bug: Uploading files with spaces in filename
What were you trying to accomplish?
Re: Bug: Uploading files with spaces in filename
The idea is that a filename might have some chars that aren't correct to use as-is in a url, so we tried to escape them, but there isn't a proper function in classic asp that takes care of that, so we created that approach that has at least this bug.