[Mono-bugs] [Bug 535183] Autoproperty + reflection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Aug 28 12:57:29 EDT 2009


User jpryor at novell.com added comment

Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jpryor at novell.com
         Resolution|                            |INVALID

--- Comment #1 from Jonathan Pryor <jpryor at novell.com>  2009-08-28 10:57:25 MDT ---
Reflection -- by design -- permits viewing and invoking private members,
include private property setters.  The 'private' in the above is only used by
two sets of tools: the compiler (so that code outside the type can't refer to
private members), and the JIT (members outside a type can't directly reference
private members).

Reflection isn't the compiler, nor is it the JIT, and it's specifically
designed to permit grabbing and invoking the private members of a type.

The way to prevent this is to use CAS (Code Access Security) under .NET.  Mono
doesn't currently support CAS, nor is it likely to ever finish support for CAS
(as .NET is deprecating CAS support in .NET4).  Silverlight introduced a new
security infrastructure which can also be used to prevent the use of Reflection
to invoke private members.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list