[Mono-dev] FW: System.Web.Mail patches #2

Sebastien Pouliot sebastien.pouliot at gmail.com
Mon Apr 24 16:16:46 EDT 2006


On Mon, 2006-04-24 at 15:48 -0400, Chris Toshok wrote:
> I'll defer to gonzalo (or someone who knows this code at all) on this
> one, but just at first sight this looks like a bad idea to me:
> 
> > +               // Load Mono.Security.dll
> > +               Assembly a;
> > +               try {
> > +                       a =
> > Assembly.LoadWithPartialName("Mono.Security");
> > +               }
> > +               catch(System.IO.FileNotFoundException) {
> > +                       throw new SmtpException( "Cannot load
> > Mono.Security.dll" );
> > +               }

This code doesn't require the strongname and is accepting code from the
local (application) directory. Both are reasons why LoadWithPartialName
has been obsoleted in 2.0.

We're already doing something similar for HTTPS in
/svn/mcs/class/System/System.Net/WebConnection.cs
-- 
Sebastien Pouliot  <sebastien at ximian.com>
Blog: http://pages.infinit.net/ctech/




More information about the Mono-devel-list mailing list