Medium Trust: Disabling reflection optimizer and making DLLs under 4.0 .NET FX SecurityTransparent (for secannotate analysis) and APTCA (for secannotate to be happy) after discussing with Levi.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-11-11 19:37:18 -08:00
parent 99dad40945
commit 1f3ddc98ed
8 changed files with 7 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -13,8 +13,14 @@
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" /> <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" /> <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
</sectionGroup> </sectionGroup>
<section name="hibernate-configuration" requirePermission="false" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections> </configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<reflection-optimizer use="false"/>
</hibernate-configuration>
<appSettings> <appSettings>
<!-- <!--
This is a workaround. Theres a known issue that causes Forms Authentication to always redirect unauthenticated users This is a workaround. Theres a known issue that causes Forms Authentication to always redirect unauthenticated users

View File

@@ -19,7 +19,6 @@ namespace Orchard.Environment.Extensions.Compilers {
_buildManager = buildManager; _buildManager = buildManager;
} }
[SecuritySafeCritical]
public CompilerResults CompileProject(string location) { public CompilerResults CompileProject(string location) {
var codeProvider = CodeDomProvider.CreateProvider("cs"); var codeProvider = CodeDomProvider.CreateProvider("cs");

View File

@@ -23,7 +23,6 @@ namespace Orchard.Environment.Extensions.Compilers {
/// Compile a csproj file given its virtual path. Use the CSharp CodeDomProvider /// Compile a csproj file given its virtual path. Use the CSharp CodeDomProvider
/// class, which is only available in full trust. /// class, which is only available in full trust.
/// </summary> /// </summary>
[SecuritySafeCritical]
public CompilerResults CompileProject(string virtualPath, string outputDirectory) { public CompilerResults CompileProject(string virtualPath, string outputDirectory) {
var codeProvider = CodeDomProvider.CreateProvider("cs"); var codeProvider = CodeDomProvider.CreateProvider("cs");
var directory = _virtualPathProvider.GetDirectoryName(virtualPath); var directory = _virtualPathProvider.GetDirectoryName(virtualPath);

View File

@@ -37,5 +37,4 @@ using System.Security;
[assembly: AssemblyVersion("0.8.0")] [assembly: AssemblyVersion("0.8.0")]
[assembly: AssemblyFileVersion("0.8.0")] [assembly: AssemblyFileVersion("0.8.0")]
[assembly: AllowPartiallyTrustedCallers] [assembly: SecurityTransparent]
[assembly: SecurityRules(SecurityRuleSet.Level2)]