From: Sean Chittenden Date: 2002-06-29T04:18:56+09:00 Subject: Re: eruby SAFE question > I'm trying to implement a replacement for the standard apache file > listings by implementing an index.rbx. I'm running into a problem, > though. I want to print out a link to everything that is a .rbx > file or a directory. However, when I call File.directory?(x) I get > a Security error. Here's the relevant code and error. While it may seem frustrating, this is the correct, predictable, and secure thing to have happen. Read below for docbook reference: > /home/northrup/web/test/index.rbx:17:in `directory?': Insecure operation - directory? (SecurityError) > > I've tried doing '@dir_test.untaint' and '@dir_test = > File.directory?(x).untaint' and neither works. I'm wondering what > I'm doing wrong and how I can get the results I want. Relevant > citations from the pickaxe would be appreciated. If you were to bypass security, you'd want x.untaint. Don't do that though. http://www.rubydoc.org/book/ (bookmark this link) The following links are subject to change upon further builds of the document. http://www.rubydoc.org/book/c123.htm#AEN133 http://www.rubydoc.org/book/c547.htm#R.DOCUMENT.ROOT -sc -- Sean Chittenden