Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem here is not prototyping, it's the service accepting executable code from the user.


Agree. Same in ruby

    Object.define_method('env') { { RUBYOPT: "-e puts 123" } }
Though ruby rejects it

    $ RUBYOPT="-e 'puts 123'" env ruby
    Traceback (most recent call last):
    ruby: invalid switch in RUBYOPT: -e (RuntimeError)
https://github.com/ruby/ruby/blob/b753929806d0e42cdfde3f1a8d...

And to use -r file needs to be .rb




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: