TCPSocket & $SAFE=1

J

Jesper Olsen

In a mod_ruby script I am trying to lookup an ip address with
TCPSocket.gethostbyname

But it fails - even though the same script in batch mode succeeds.

I notice that $SAFE==1 - is this what is preventing the method to
execute?

Cheers
Jesper
 
Y

Yukihiro Matsumoto

Hi,

In message "TCPSocket & $SAFE=1"

|In a mod_ruby script I am trying to lookup an ip address with
|TCPSocket.gethostbyname
|
|But it fails - even though the same script in batch mode succeeds.

How it fails?

matz.
 
J

Jesper Olsen

ts said:
J> But it fails - even though the same script in batch mode succeeds.

You must untaint the String given to TCPSocket::gethostbyname : be
carefull when you do this


Guy Decoux

Yes, that did the trick. Thanks for the hint.

Jesper
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top