Index: [Article Count Order] [Thread]

Date:  Mon, 20 Sep 2004 12:16:33 +0200
From:  Nagy Bence <tipogral@...>
Subject:  Security error with ERuby
To:  modruby@... (modruby ML)
Message-Id:  <20040920121633.5f35af04.tipogral@...>
X-Mail-Count: 01303

Hi all,

I tried to run to following script for testing ERuby.

<%
require "cgi"
require "cgi/session"
ERuby.noheader = true
cgi = CGI.new
session = CGI::Session.new(cgi)
session["test"]="test"
session.close
print cgi.header
%>
<html>
<head><title></title></head>
<body>
<p>test</p>
</body>
</html>

I got allways the following error in the 2nd line:

loading from unsafe path
/usr/lib/ruby/site_ruby/1.8:/usr/lib/ruby/site_ruby/1.8/i386-linux-gnu:
/usr/lib/ruby/site_ruby:/usr/lib/ruby/1.8:/usr/lib/ruby/1.8/i386-linux-
gnu:. (SecurityError)

I would like to find a solution without setting RubySafeLevel to 0 or
without loading cgi.rb by RubyRequire.

Thanks,

Bence