From: Constantin Gavrilescu Date: 2007-09-13T02:53:38+09:00 Subject: Re: secure file writing (escaping characters from the file n Luis Parravicini wrote: > On 9/12/07, Constantin Gavrilescu wrote: >> >> Any pointers? More importantly about escaping special characters, and >> avoiding directory traversal. > > Hi Constantin, > > Maybe instead of escaping/removing any character in the filename you > can store the file with a unique name and have an index with the user > supplied filename and the name of the file in the file system? The files are also shared over the network with samba, so they need to have a meaningful name. That's why I need to escape just the "bad characters" and keep most of the other info in. -- Posted via http://www.ruby-forum.com/.