Re: Malicious code with limited character set?
- From: "shimmyshack" <matt.farey@xxxxxxxxx>
- Date: 30 Mar 2007 10:53:43 -0700
On 30 Mar, 14:49, "Paul E Collins" <find_my_real_addr...@xxxxxxx>
wrote:
"Paul E Collins" <find_my_real_addr...@xxxxxxx> wrote:
Without semicolons or braces, I believe the user will not be able to
create an expression that does anything bad (such as an infinite
loop or attempts at file access). Can anyone prove me wrong?
Curses. I've just found out that the semicolon isn't necessary, i.e.
this infinite loop will work in "eval" rather than raising a syntax
error: while(true)continue
I think I'll just have to ban upper- and lower-case letters altogether
unless they form part of a recognised Math library function.
Eq.
can you set limits on the resources (CPU/time,mem) this dll will use,
and if the call throws an error... IMHO blacklisting will never work,
someone who wants to will find a way.
What model can you impose for the class of expression do you allow, if
you only allowed polynomials up to a certain degree, or allowed only
certain types of formatting of certain operators, I'm thinking of ^(a/
b) for roots, you could lock the thing down using regular expressions.
It would be up to the customer not to try to use
^(123^123456/-6^(-7)) because you only accept ^a/b where a and b are
integers, (^c where c is rational) up to a certain accuracy.
Am I being too simplistic or forcing your users to jump through too
many hoops, how advanced are they? - the more advanced the less
restrictions they would mind.
.
- Follow-Ups:
- Re: Malicious code with limited character set?
- From: Paul E Collins
- Re: Malicious code with limited character set?
- References:
- Malicious code with limited character set?
- From: Paul E Collins
- Re: Malicious code with limited character set?
- From: Paul E Collins
- Malicious code with limited character set?
- Prev by Date: Re: Internet Explorer waits to render problem
- Next by Date: Re: About the DOM document object
- Previous by thread: Re: Malicious code with limited character set?
- Next by thread: Re: Malicious code with limited character set?
- Index(es):
Relevant Pages
|