[DGD] Re: My idea for the DGD driver - validate

Robert Forshaw iouswuoibev at hotmail.com
Fri Feb 13 16:12:54 CET 2004


> > >By masking call_other(), you are making things needlessly complex.
> >
> > How come?
>
>It is hard to be more specific since I have only a vague notion of
>what you are trying to accomplish.  I have noticed a tendency among
>people who have just discovered that call_other() can be masked, to
>consider it the solution to everything.  So, broadly stated, I hope
>that you will reconsider other ideas, should you come to the
>conclusion that redefining call_other() does not suffice.

What I am trying to ultimately accomplish is to have checks performed before 
various functions in an object are allowed to continue execution, to ensure 
that only the right objects are able to call it. My validate() idea, as you 
called it, was sufficient for this except for two things: it was more prone 
to error (i.e. it is in theory possible to still call a function that you 
aren't meant to), and the alternative way I came up with is even easier to 
implent. Because the 'validate' idea I had (and subsequently, the masking 
idea that was suggested) involves a manditory function call that will 
dissallow every call_other by default, it is much more difficult to make a 
security gap as a result of human error, and it isn't necessary to go adding 
code to the beginning of every function you want protected. I appreciate 
what you were saying about people mistakenly seeing masking call_other as a 
be-all-end-all solution, but in this particular case, I think it's a very 
good solution and I don't foresee any problems with it except for the 
additional overhead, which is minor. I will of course post an update if it 
doesn't work out how I expect it to. :)

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list