On Jan 8, 2006, at 2:44 AM, Gregory Brown wrote:

> On 1/8/06, Eero Saynatkari <ruby-ml / magical-cat.org> wrote:
>
>> If one were inclined to actually argue a point, one might mention   
>> some
>> of C++'s vulnerabilities: buffer overflows, pointers, memory handling
>> and so on.
>
> This is a good point.  In languages like C++, your security can really
> go to hell through improper memory management.  This is much less
> likely to happen in Ruby.
>

Don't let the java guys off so easily, either.

- In Java it's possible to add classes to a package unless that  
package is sealed.
- When inner classes are compiled in Java they are converted to  
ordinary classes. Any private fields of the containing class are  
converted to public fields.
- Cloning an object in Java bypasses its constructor.
- Non-clonable classes can be extended and the child can implement  
cloneable.
- Java objects can be serialized exposing state, including private  
fields.
- Non-serializable objects can be sub-classed just like non-cloneable  
objects.
- Serialized objects can be deserialized, bypassing the constructor.
- Static fields are essentially globals, discoverable and settable by  
anyone.

All of these can be addressed with good, but tedious, coding  
practices, but still when trying to secure Java code from another  
programmer, you have your work cut out for you.  This is especially  
tricky in Java "frameworks" and development tools that routinely  
serialize/deserialize objects and use reflection to create objects at  
runtime.

Pete