Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938">
<HintPath>..\..\..\packages/BouncyCastle.Cryptography.2.3.1/lib/net461/BouncyCastle.Cryptography.dll</HintPath>
<HintPath>..\..\..\packages\BouncyCastle.Cryptography.2.3.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DataProviders, Version=4.17.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -132,7 +132,7 @@
<HintPath>..\..\..\packages\SixLabors.Fonts.1.0.1\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.ImageSharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13">
<HintPath>..\..\..\packages/SixLabors.ImageSharp.2.1.8/lib/net472/SixLabors.ImageSharp.dll</HintPath>
<HintPath>..\..\..\packages\SixLabors.ImageSharp.2.1.9\lib\net472\SixLabors.ImageSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SkiaSharp, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
Expand Down
32 changes: 20 additions & 12 deletions Examples/SampleAspDotNet/SampleAspDotNet/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<configuration>
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
Expand All @@ -16,32 +16,40 @@
</system.Web>
-->
<system.web>
<compilation debug="true" targetFramework="4.8"/>
<compilation debug="true" targetFramework="4.8" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />

Check failure

Code scanning / CodeQL

'requireSSL' attribute is not set to true

The 'requireSSL' attribute is not set to 'true'.

Copilot Autofix

AI over 1 year ago

To fix the problem, we need to set the requireSSL attribute to true in the <forms> element within the Web.config file. This change ensures that sensitive data transmitted via forms is protected by SSL. The modification should be made specifically on line 21 of the Web.config file.

Suggested changeset 1
Examples/SampleAspDotNet/SampleAspDotNet/Web.config

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/Examples/SampleAspDotNet/SampleAspDotNet/Web.config b/Examples/SampleAspDotNet/SampleAspDotNet/Web.config
--- a/Examples/SampleAspDotNet/SampleAspDotNet/Web.config
+++ b/Examples/SampleAspDotNet/SampleAspDotNet/Web.config
@@ -20,3 +20,3 @@
     <authentication mode="Forms">
-      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
+      <forms loginUrl="~/Account/Login.aspx" timeout="2880" requireSSL="true" />
     </authentication>
EOF
@@ -20,3 +20,3 @@
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
<forms loginUrl="~/Account/Login.aspx" timeout="2880" requireSSL="true" />
</authentication>
Copilot is powered by AI and may make mistakes. Always verify output.
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<pages controlRenderingCompatibilityVersion="4.0"/>
<pages controlRenderingCompatibilityVersion="4.0" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="SixLabors.ImageSharp" publicKeyToken="d998eea7b14cab13" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
2 changes: 1 addition & 1 deletion Examples/SampleAspDotNet/SampleAspDotNet/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<package id="NPOI" version="2.7.0" targetFramework="net48" />
<package id="SharpZipLib" version="1.4.2" targetFramework="net48" />
<package id="SixLabors.Fonts" version="1.0.1" targetFramework="net48" />
<package id="SixLabors.ImageSharp" version="2.1.8" targetFramework="net48" />
<package id="SixLabors.ImageSharp" version="2.1.9" targetFramework="net48" />
<package id="SkiaSharp" version="2.88.6" targetFramework="net48" />
<package id="SkiaSharp.NativeAssets.macOS" version="2.88.6" targetFramework="net48" />
<package id="SkiaSharp.NativeAssets.Win32" version="2.88.6" targetFramework="net48" />
Expand Down