#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1...

Discussion in 'Ruby' started by anne001, Apr 23, 2006.

  1. anne001

    anne001 Guest

    ""All external data is dangerous. Don't let it close to interfaces that
    can modify your system."
    http://www.rubycentral.com/book/taint.html

    what does #!/usr/bin/ruby -w do?

    is #!/usr/bin/ruby -T1 the same as -T with $SAFE=1?

    Why not always use -T with a safety level of at least 1?

    "Walter should have run his CGI script at a safe level of 1,This would
    have raised an exception when the program tried to pass form data to
    eval"
    In what log file do exceptions show up?

    "He could have chosen to implement a proper expression parser,
    bypassing the risks inherent in using eval."
    Does that mean defining in advance the expressions the use can enter?
    like phone systems, do you want agent, billing, etc?
    anne001, Apr 23, 2006
    #1
    1. Advertising

  2. anne001

    ts Guest

    >>>>> "a" == anne001 <> writes:

    a> what does #!/usr/bin/ruby -w do?

    it make ruby more verbose

    moulon% ruby -e 'p (1)'
    1
    moulon%

    moulon% ruby -we 'p (1)'
    -e:1: warning: (...) interpreted as grouped expression
    1
    moulon%

    a> is #!/usr/bin/ruby -T1 the same as -T with $SAFE=1?

    '#!/usr/bin/ruby -T' is the same than '#!/usr/bin/ruby -T1'

    #!/usr/bin/ruby -T1

    set $SAFE = 1 when ruby process the argument

    a> Why not always use -T with a safety level of at least 1?

    Except with -T0, if you use -T you have fatally a safety level of at
    least 1

    --

    Guy Decoux
    ts, Apr 23, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Salerno
    Replies:
    30
    Views:
    1,951
    Stephan Kuhagen
    Aug 10, 2006
  2. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    1,990
    Tim Roberts
    May 10, 2008
  3. TsanChung
    Replies:
    4
    Views:
    1,228
    TsanChung
    Sep 21, 2008
  4. shankha
    Replies:
    0
    Views:
    682
    shankha
    May 5, 2009
  5. Gilles
    Replies:
    7
    Views:
    555
    Matej Cepl
    Sep 30, 2012
Loading...

Share This Page