J. Ryan Sobol
1/9/2006 3:14:00 PM
On Jan 9, 2006, at 5:18 AM, zimbatm wrote:
> First example. Imaging you're building a big web application where
> users can submit their templates (eg. blog or wiki hosting) and you're
> using embedded ruby in html. How can you trust that the user won't
> send
> an "evil" template without reviewing it ? (disregarding javascript XSS
> exploits)
> Second example. You're implementing a remote execution mechanism with
> agents. Like Java's JINI, you want clients to send pieces of code that
> will be executed in the server's environment and then give the result
> back. It's a bit like the client would send blocks to the server. How
> do you avoid the client sending "evil" code that would redefine how
> the
> server would work ?
These problems are one and the same: never, ever, ever trust user
data. (completed web forms, templates, client-side code, etc.)
Would you really not examine the template if it where embedded PHP or
something similar? Is it not possible for client-side code to do
"bad things" in JINI? I argue that this is not the fault of the
language, but problems inherent to the world the application lives in.
~ ryan ~