ufairiya / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Rejecting suspicious path: [c:\Programs\Notepad++] #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create a directory with a name containing a '+' symbol.
Run mongoose to list the parent directory of the one you've just created.
(in my case: mongoose.exe -root C:\Programs )

What is the expected output? What do you see instead?
I would have this directory listed among the others, but I get instead:
Rejecting suspicious path: [c:\Programs\Notepad++] 

What version of the product are you using? On what operating system?
Mongoose 2.8 (.exe)
Windows XP Pro.

Please provide any additional information below.

Note that if I remove the symbols '++' from the directory name, it works well.

Original issue reported on code.google.com by marcu...@gmail.com on 16 Jul 2009 at 12:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The + sign represents a space when used in a URL. Therefore, files to be served
should not have + in their names. In your example, notepad++.exe is a Windows
executable file, which should be run under Windows, not served by a webserver 
like
Mongoose. My vote would be to reject your bug report. In the real world, served 
files
are not likely to have + in their names.

But your bug report actually concerns a directory, not a file. In the case of
directories, you may be able to workaround this limitation by using the alias
directive. But I repeat that this rejection makes sense, as + has always been
reserved in Web space to represent a space character.

There has never been a requirement to serve any arbitrarily named directory or 
file
to the Web. If anyone thought this would be needed, they would have had a 
quoting
convention for URLs. As you know, there is no such convention.

You may find http://www.phpfreaks.com/forums/index.php?topic=111960.0 of 
interest, in
which the string "C++" is changed to "C  " because of the special meaning of + 
in URLs.

http://maine.edu/VM:Webgateway/HELP/print/prtdrctl.html is an example of another
server that (correctly) considers plus signs as invalid in URLs.

Original comment by googl...@springtimesoftware.com on 22 Jul 2009 at 11:53

GoogleCodeExporter commented 9 years ago
Thank you!

So you suggest me to use aliases :)

Ok, I'll do that :)

Original comment by marcu...@gmail.com on 23 Jul 2009 at 10:00

GoogleCodeExporter commented 9 years ago
I still think Mongoose can do a better job by URL-encoding file names in 
directory
listings. I'll try to fix this soon, since this can be quite confusing for 
people who
use Mongoose for file sharing.

Original comment by valenok on 23 Jul 2009 at 10:05

GoogleCodeExporter commented 9 years ago
I have submitted http://code.google.com/p/mongoose/source/detail?r=456
Please sync and confirm it fixes the problem.

Original comment by valenok on 23 Jul 2009 at 9:18

GoogleCodeExporter commented 9 years ago
Marking as fixed. Please sync and vrify, reopen the bug if not happy.

Original comment by valenok on 24 Jul 2009 at 4:13

GoogleCodeExporter commented 9 years ago
Well done :)
I've just tried it on Debian and it worked well, without warnings/errors.

Thank you :)

Original comment by marcu...@gmail.com on 24 Jul 2009 at 8:41